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

Method copy

daemon/src/service/system_file.ts:230–235  ·  view source on GitHub ↗
(target1: string, target2: string)

Source from the content-addressed store, hash-verified

228 }
229
230 async copy(target1: string, target2: string) {
231 if (!this.checkPath(target2) || !this.check(target1)) throw new Error(ERROR_MSG_01);
232 const targetPath = this.toAbsolutePath(target1);
233 target2 = this.toAbsolutePath(target2);
234 return await fs.copy(targetPath, target2);
235 }
236
237 mkdir(target: string) {
238 if (!this.checkPath(target)) throw new Error(ERROR_MSG_01);

Callers 1

file_router.tsFile · 0.80

Calls 3

checkPathMethod · 0.95
checkMethod · 0.95
toAbsolutePathMethod · 0.95

Tested by

no test coverage detected