mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-26 17:43:48 +01:00
Merge pull request #2648 from SlyCedix/scp-def
Add function signature for scp(files, destination)
This commit is contained in:
commit
0b36c9a4b2
@ -1074,7 +1074,7 @@ export function NetscriptFunctions(workerScript: WorkerScript): NS {
|
|||||||
workerScript.log("exit", () => "Failed. This is a bug. Report to dev.");
|
workerScript.log("exit", () => "Failed. This is a bug. Report to dev.");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
scp: async function (scriptname: any, hostname1: any, hostname2: any): Promise<boolean> {
|
scp: async function (scriptname: any, hostname1: any, hostname2?: any): Promise<boolean> {
|
||||||
updateDynamicRam("scp", getRamCost(Player, "scp"));
|
updateDynamicRam("scp", getRamCost(Player, "scp"));
|
||||||
if (arguments.length !== 2 && arguments.length !== 3) {
|
if (arguments.length !== 2 && arguments.length !== 3) {
|
||||||
throw makeRuntimeErrorMsg("scp", "Takes 2 or 3 arguments");
|
throw makeRuntimeErrorMsg("scp", "Takes 2 or 3 arguments");
|
||||||
|
1
src/ScriptEditor/NetscriptDefinitions.d.ts
vendored
1
src/ScriptEditor/NetscriptDefinitions.d.ts
vendored
@ -4898,6 +4898,7 @@ export interface NS extends Singularity {
|
|||||||
* @param destination - Host of the destination server, which is the server to which the file will be copied.
|
* @param destination - Host of the destination server, which is the server to which the file will be copied.
|
||||||
* @returns True if the script/literature file is successfully copied over and false otherwise. If the files argument is an array then this function will return true if at least one of the files in the array is successfully copied.
|
* @returns True if the script/literature file is successfully copied over and false otherwise. If the files argument is an array then this function will return true if at least one of the files in the array is successfully copied.
|
||||||
*/
|
*/
|
||||||
|
scp(files: string | string[], destination: string): Promise<boolean>;
|
||||||
scp(files: string | string[], source: string, destination: string): Promise<boolean>;
|
scp(files: string | string[], source: string, destination: string): Promise<boolean>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user