MCPcopy Create free account
hub / github.com/Xyntopia/taskyon / getRoot

Function getRoot

src/modules/OPFS.ts:5–17  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3}
4
5async function getRoot() {
6 // Open the "root" of the website's (origin's) private filesystem (OPFS):
7 let storageRoot: FileSystemDirectoryHandle | undefined = undefined;
8 try {
9 if (navigator.storage && navigator.storage.getDirectory) {
10 storageRoot = await navigator.storage.getDirectory();
11 }
12 } catch (err) {
13 console.error(err);
14 return;
15 }
16 return storageRoot;
17}
18
19export async function writeFiles(
20 newFiles: File[]

Callers 3

writeFilesFunction · 0.85
lsFunction · 0.85
openFileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected