mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-18 21:53:50 +01:00
Update doc for ns.scp (#262)
This commit is contained in:
parent
303c54c85c
commit
5a86be8714
@ -817,7 +817,7 @@ export const ns: InternalAPI<NSFull> = {
|
||||
if (!isValidFilePath(file)) throw helpers.makeRuntimeErrorMsg(ctx, `Invalid filename: '${file}'`);
|
||||
|
||||
// Invalid file type
|
||||
if (!file.endsWith(".lit") && !isScriptFilename(file) && !file.endsWith("txt")) {
|
||||
if (!file.endsWith(".lit") && !isScriptFilename(file) && !file.endsWith(".txt")) {
|
||||
throw helpers.makeRuntimeErrorMsg(ctx, "Only works for scripts, .lit and .txt files.");
|
||||
}
|
||||
}
|
||||
|
2
src/ScriptEditor/NetscriptDefinitions.d.ts
vendored
2
src/ScriptEditor/NetscriptDefinitions.d.ts
vendored
@ -5677,7 +5677,7 @@ export interface NS {
|
||||
* const files = ["hack.js","weaken.js","grow.js"];
|
||||
* ns.scp(files, server, "home");
|
||||
* ```
|
||||
* @param files - Filename or an array of filenames of script/literature files to copy.
|
||||
* @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 destination - Hostname of the destination server, which is the server to which the file will be copied.
|
||||
* @param source - Hostname 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.
|
||||
|
Loading…
Reference in New Issue
Block a user