mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-06 00:27:24 +00:00
Add missing FS methods needed by isomorphic-git
This commit is contained in:
4 files changed
+26
-4
No files matched your search
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user