MCPcopy Create free account
hub / github.com/scriptscat/scriptcat / loadHandle

Function loadHandle

src/pkg/utils/filehandle-db.ts:26–33  ·  view source on GitHub ↗
(key: string)

Source from the content-addressed store, hash-verified

24
25// Load a file handle by key
26export async function loadHandle(key: string): Promise<FileSystemFileHandle> {
27 const result = await db.handles.get(key);
28 if (result?.handle instanceof FileSystemFileHandle) {
29 return result.handle;
30 } else {
31 throw new Error("Handle not found or invalid");
32 }
33}
34
35// Delete a file handle by key
36export async function deleteHandle(key: string): Promise<void> {

Callers 1

initAsyncFunction · 0.90

Calls 1

getMethod · 0.65

Tested by

no test coverage detected