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

Function clearUploadFiles

daemon/src/tools/filepath.ts:18–27  ·  view source on GitHub ↗
(file?: formidable.File | formidable.File[])

Source from the content-addressed store, hash-verified

16}
17
18export function clearUploadFiles(file?: formidable.File | formidable.File[]) {
19 if (!file) return;
20 if (file instanceof Array) {
21 file.forEach((v) => {
22 fs.remove(v.filepath, () => {});
23 });
24 } else {
25 fs.remove(file.filepath, () => {});
26 }
27}
28
29export function normalizedJoin(...paths: string[]) {
30 if (os.platform() === "win32") {

Callers 1

http_router.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected