bitburner-src/doc/source/netscript/basicfunctions/ls.rst

16 lines
406 B
ReStructuredText
Raw Normal View History

ls() Netscript Function
=======================
2021-03-12 08:51:56 +01:00
.. js:function:: ls(hostname[, grep])
:RAM cost: 0.2 GB
2021-03-12 08:51:56 +01:00
:param string hostname: Hostname of the target server.
:param string grep: a substring to search for in the filename.
:returns: String array of all files in alphabetical order.
2021-03-12 08:51:56 +01:00
Example:
.. code-block:: javascript
ls("home"); // returns: ["demo.script", "msg1.txt"]