mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-24 23:22:29 +01:00
33 lines
833 B
Markdown
33 lines
833 B
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
|
|
[Home](./index.md) > [bitburner](./bitburner.md) > [NS](./bitburner.ns.md) > [clear](./bitburner.ns.clear.md)
|
|
|
|
## 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.
|
|
|
|
<b>Signature:</b>
|
|
|
|
```typescript
|
|
clear(handle: Handle): void;
|
|
```
|
|
|
|
## Parameters
|
|
|
|
| Parameter | Type | Description |
|
|
| --- | --- | --- |
|
|
| handle | [Handle](./bitburner.handle.md) | Port or text file to clear. |
|
|
|
|
<b>Returns:</b>
|
|
|
|
void
|
|
|
|
## Remarks
|
|
|
|
1 GB
|
|
|