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

Method getByParentFilePath

lib/models/files.ts:484–491  ·  view source on GitHub ↗
(userId: string, parentFilePath: string)

Source from the content-addressed store, hash-verified

482 }
483
484 static async getByParentFilePath(userId: string, parentFilePath: string): Promise<FileShare[]> {
485 const fileShares = await db.query<FileShare>(
486 sql`SELECT * FROM "bewcloud_file_shares" WHERE "user_id" = $1 AND "file_path" LIKE $2`,
487 [userId, `${parentFilePath}%`],
488 );
489
490 return fileShares;
491 }
492
493 static async create(fileShare: Omit<FileShare, 'id' | 'created_at'>): Promise<FileShare> {
494 const newFileShare = (await db.query<FileShare>(

Callers 6

listMethod · 0.80
searchNamesMethod · 0.80
listMethod · 0.80
searchNamesMethod · 0.80
searchContentsMethod · 0.80
deleteDirectoryOrFileFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected