[Home](./index.md) > [bitburner](./bitburner.md) > [NS](./bitburner.ns.md) > [ls](./bitburner.ns.ls.md) ## NS.ls() method List files on a server. **Signature:** ```typescript ls(host: string, substring?: string): string[]; ``` ## Parameters
| Parameter | Type | Description |
|---|---|---|
| host | string | Hostname/IP of the target server. |
| substring | string | _(Optional)_ A substring to search for in the filename. |