mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-17 21:23:54 +01:00
34 lines
788 B
Markdown
34 lines
788 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
|
|
|
|
List files on a server.
|
|
|
|
**Signature:**
|
|
|
|
```typescript
|
|
ls(host: string, substring?: string): string[];
|
|
```
|
|
|
|
## Parameters
|
|
|
|
| Parameter | Type | Description |
|
|
| --- | --- | --- |
|
|
| host | string | Hostname of the target server. |
|
|
| substring | string | _(Optional)_ A substring to search for in the filename. |
|
|
|
|
**Returns:**
|
|
|
|
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.
|
|
|