MCPcopy Create free account
hub / github.com/MCSManager/MCSManager / move

Method move

daemon/src/service/system_file.ts:254–260  ·  view source on GitHub ↗
(target: string, destPath: string)

Source from the content-addressed store, hash-verified

252 }
253
254 async move(target: string, destPath: string) {
255 if (!this.check(target)) throw new Error(ERROR_MSG_01);
256 if (!this.checkPath(destPath)) throw new Error(ERROR_MSG_01);
257 const targetPath = this.toAbsolutePath(target);
258 destPath = this.toAbsolutePath(destPath);
259 await fs.move(targetPath, destPath);
260 }
261
262 async unzip(sourceZip: string, destDir: string, code?: string) {
263 if (!code) code = this.fileCode;

Callers 4

settings_router.tsFile · 0.80
file_router.tsFile · 0.80
http_router.tsFile · 0.80

Calls 3

checkMethod · 0.95
checkPathMethod · 0.95
toAbsolutePathMethod · 0.95

Tested by

no test coverage detected