bitburner-src/markdown/bitburner.ns.ls.md
Olivier Gagnon feb0430aff work on doc
2021-10-30 15:46:34 -04:00

748 B

Home > bitburner > NS > ls

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.

Signature:

ls(host: string, grep?: string): string[];

Parameters

Parameter Type Description
host string Host or IP of the target server.
grep string 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