mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-05-21 15:12:06 +02:00
DOCUMENTATION: Clarify ns.scp and ns.isRunning (#2769)
This commit is contained in:
@@ -9,7 +9,7 @@ Check if a script is running.
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
isRunning(script: FilenameOrPID, host?: string, ...args: ScriptArg[]): boolean;
|
||||
isRunning(script?: FilenameOrPID, host?: string, ...args: ScriptArg[]): boolean;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
@@ -42,7 +42,7 @@ script
|
||||
|
||||
</td><td>
|
||||
|
||||
Filename or PID of script to check. This is case-sensitive.
|
||||
_(Optional)_ Filename (case-sensitive) or PID of script to check. Optional, default to the current script's pid.
|
||||
|
||||
|
||||
</td></tr>
|
||||
|
||||
@@ -42,7 +42,7 @@ string \| string\[\]
|
||||
|
||||
</td><td>
|
||||
|
||||
Filename or an array of filenames of script/literature files to copy. Note that if a file is located in a subdirectory, the filename must include the leading `/`<!-- -->.
|
||||
Filename or an array of filenames of text/script/literature files to copy. Note that if a file is located in a subdirectory, the filename must include the leading `/`<!-- -->.
|
||||
|
||||
|
||||
</td></tr>
|
||||
@@ -90,7 +90,7 @@ True if the file is successfully copied over and false otherwise. If the files a
|
||||
|
||||
RAM cost: 0.6 GB
|
||||
|
||||
Copies a script or literature (.lit) file(s) to another server. The files argument can be either a string specifying a single file to copy, or an array of strings specifying multiple files to copy.
|
||||
Copies text, script or literature (.lit) file(s) to another server. The files argument can be either a string specifying a single file to copy, or an array of strings specifying multiple files to copy.
|
||||
|
||||
## Example 1
|
||||
|
||||
|
||||
+4
-4
@@ -8032,7 +8032,7 @@ export interface NS {
|
||||
* @remarks
|
||||
* RAM cost: 0.6 GB
|
||||
*
|
||||
* Copies a script or literature (.lit) file(s) to another server. The files argument can be either a string
|
||||
* Copies text, script or literature (.lit) file(s) to another server. The files argument can be either a string
|
||||
* specifying a single file to copy, or an array of strings specifying multiple files to copy.
|
||||
*
|
||||
* @example
|
||||
@@ -8057,7 +8057,7 @@ export interface NS {
|
||||
* connection) or {@link Darknet.connectToSession | dnet.connectToSession} (at any distance) to
|
||||
* establish a session.
|
||||
*
|
||||
* @param files - Filename or an array of filenames of script/literature files to copy. Note that if a file is located in a subdirectory, the filename must include the leading `/`.
|
||||
* @param files - Filename or an array of filenames of text/script/literature files to copy. Note that if a file is located in a subdirectory, the filename must include the leading `/`.
|
||||
* @param destination - Hostname/IP of the destination server, which is the server to which the file will be copied.
|
||||
* @param source - Hostname/IP of the source server, which is the server from which the file will be copied. This argument is optional and if it’s omitted the source will be the current server.
|
||||
* @returns True if the file is successfully copied over and false otherwise. If the files argument is an array then this function will return false if any of the operations failed.
|
||||
@@ -8379,12 +8379,12 @@ export interface NS {
|
||||
* //The function call will return true if there is a script named foo.js running with the arguments 1, 5, and “test” (in that order) on the joesguns server, and false otherwise:
|
||||
* ns.isRunning("foo.js", "joesguns", 1, 5, "test");
|
||||
* ```
|
||||
* @param script - Filename or PID of script to check. This is case-sensitive.
|
||||
* @param script - Filename (case-sensitive) or PID of script to check. Optional, default to the current script's pid.
|
||||
* @param host - Hostname/IP of target server. Optional, defaults to the server the calling script is running on.
|
||||
* @param args - Arguments to specify/identify the script. Optional, when looking for scripts run without arguments.
|
||||
* @returns True if the specified script is running on the target server, and false otherwise.
|
||||
*/
|
||||
isRunning(script: FilenameOrPID, host?: string, ...args: ScriptArg[]): boolean;
|
||||
isRunning(script?: FilenameOrPID, host?: string, ...args: ScriptArg[]): boolean;
|
||||
|
||||
/**
|
||||
* Get general info about a running script.
|
||||
|
||||
Reference in New Issue
Block a user