MCPcopy Create free account
hub / github.com/bewcloud/bewcloud / create

Method create

lib/models/files.ts:68–81  ·  view source on GitHub ↗
(userId: string, path: string, name: string)

Source from the content-addressed store, hash-verified

66 }
67
68 static async create(userId: string, path: string, name: string): Promise<boolean> {
69 await ensureUserPathIsValidAndSecurelyAccessible(userId, join(path, name));
70
71 const rootPath = join(await AppConfig.getFilesRootPath(), userId, path);
72
73 try {
74 await Deno.mkdir(join(rootPath, name), { recursive: true });
75 } catch (error) {
76 console.error(error);
77 return false;
78 }
79
80 return true;
81 }
82
83 static async rename(
84 userId: string,

Callers

nothing calls this directly

Tested by

no test coverage detected