bitburner-src/markdown/bitburner.ns.ls.md
omuretsu 06a985bdf8 Revert "Remove markdown from git tracking (#139)"
This reverts commit bbb6e3f309935aebac74ddb1fbeec12dfb7540b1.
2022-10-21 11:16:00 -04:00

34 lines
767 B
Markdown

<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [NS](./bitburner.ns.md) &gt; [ls](./bitburner.ns.ls.md)
## NS.ls() method
List files on a server.
<b>Signature:</b>
```typescript
ls(host: string, grep?: string): string[];
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| host | string | Host of the target server. |
| grep | string | A substring to search for in the filename. |
<b>Returns:</b>
string\[\]
Array with the filenames of all files on the specified server.
## Remarks
RAM cost: 0.2 GB
Returns an array with the filenames of all files on the specified server (as strings). The returned array is sorted in alphabetic order.