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

843 B

Home > bitburner > NS > clear

NS.clear() method

This function is used to clear data in a Netscript Ports or a text file.

If the port/fn argument is a number between 1 and 20, then it specifies a port and will clear it (deleting all data from the underlying queue).

If the port/fn argument is a string, then it specifies the name of a text file (.txt) and will delete all data from that text file.

Signature:

clear(handle: Handle): void;

Parameters

Parameter Type Description
handle Handle Port or text file to clear.

Returns:

void

Remarks

RAM cost: 1 GB