MCPcopy
hub / github.com/gildas-lormeau/zip.js / transformToFileSystemhandle

Function transformToFileSystemhandle

index-native.cjs:6817–6832  ·  view source on GitHub ↗
(entry)

Source from the content-addressed store, hash-verified

6815}
6816
6817async function transformToFileSystemhandle(entry) {
6818 const handle = {
6819 name: entry.name
6820 };
6821 if (entry.isFile) {
6822 handle.kind = "file";
6823 handle.getFile = () =>
6824 new Promise((resolve, reject) => entry.file(resolve, reject));
6825 }
6826 if (entry.isDirectory) {
6827 handle.kind = "directory";
6828 const handles = await transformToFileSystemhandles(entry);
6829 handle.values = () => handles;
6830 }
6831 return handle;
6832}
6833
6834async function transformToFileSystemhandles(entry) {
6835 const entries = [];

Callers 2

addFileFunction · 0.70
readEntriesFunction · 0.70

Calls 1

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…