mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-10 01:33:54 +01:00
32 lines
757 B
Markdown
32 lines
757 B
Markdown
|
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||
|
|
||
|
[Home](./index.md) > [bitburner](./bitburner.md) > [NS](./bitburner.ns.md) > [ls](./bitburner.ns.ls.md)
|
||
|
|
||
|
## NS.ls() method
|
||
|
|
||
|
Returns an array with the filenames of all files on the specified server (as strings). The returned array is sorted in alphabetic order.
|
||
|
|
||
|
<b>Signature:</b>
|
||
|
|
||
|
```typescript
|
||
|
ls(host: Host, grep?: string): string[];
|
||
|
```
|
||
|
|
||
|
## Parameters
|
||
|
|
||
|
| Parameter | Type | Description |
|
||
|
| --- | --- | --- |
|
||
|
| host | [Host](./bitburner.host.md) | Host or IP 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
|
||
|
|
||
|
0.2 GB
|
||
|
|