work on making the netscript api tighter

This commit is contained in:
Olivier Gagnon
2021-11-03 20:19:52 -04:00
parent c5fb5155f3
commit 14150d3e33
270 changed files with 11011 additions and 1273 deletions
+4 -8
View File
@@ -4,19 +4,19 @@
## NS.clear() method
Clear data from a port.
Clear data from a file.
<b>Signature:</b>
```typescript
clear(handle: string | number): void;
clear(handle: string): void;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| handle | string \| number | Port or text file to clear. |
| handle | string | Text file to clear. |
<b>Returns:</b>
@@ -26,9 +26,5 @@ void
RAM cost: 0 GB
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.
Delete all data from that text file.