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

Method delete

daemon/src/service/system_file.ts:243–252  ·  view source on GitHub ↗
(target: string)

Source from the content-addressed store, hash-verified

241 }
242
243 async delete(target: string): Promise<boolean> {
244 if (!this.check(target)) throw new Error(ERROR_MSG_01);
245 const targetPath = this.toAbsolutePath(target);
246 return new Promise((r, j) => {
247 fs.remove(targetPath, (err) => {
248 if (!err) r(true);
249 else j(err);
250 });
251 });
252 }
253
254 async move(target: string, destPath: string) {
255 if (!this.check(target)) throw new Error(ERROR_MSG_01);

Callers

nothing calls this directly

Calls 2

checkMethod · 0.95
toAbsolutePathMethod · 0.95

Tested by

no test coverage detected