Add missing FS methods needed by isomorphic-git

This commit is contained in:
Alex Gleason committed 2025-07-20 17:03:48 -05:00
1 parent 0b0696e624
commit 0fbd5f0b84
4 files changed
+26 -4

No files matched your search

+10 -2
View File
@@ -35,8 +35,8 @@ export class LightningFSAdapter implements JSRuntimeFS {
const stat = await this.lightningFS.stat(itemPath);
entries.push({
name: item,
isDirectory: stat.isDirectory.bind(stat),
isFile: stat.isFile.bind(stat),
isDirectory: () => stat.isDirectory(),
isFile: () => stat.isFile(),
});
} catch {
// If stat fails, assume it's a file
@@ -102,4 +102,12 @@ export class LightningFSAdapter implements JSRuntimeFS {
async rename(oldPath: string, newPath: string): Promise<void> {
return this.lightningFS.rename(oldPath, newPath);
}
async readlink(path: string): Promise<string> {
return this.lightningFS.readlink(path);
}
async symlink(target: string, path: string): Promise<void> {
return this.lightningFS.symlink(target, path);
}
}