@zenfs/core 0.3.2 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/FileIndex.d.ts +3 -3
- package/dist/FileIndex.js +4 -4
- package/dist/browser.min.js +5 -5
- package/dist/browser.min.js.map +4 -4
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/package.json +1 -1
package/dist/FileIndex.d.ts
CHANGED
|
@@ -180,9 +180,9 @@ export declare abstract class FileIndexFS<TIndex> extends FileIndexFS_base {
|
|
|
180
180
|
readdir(path: string): Promise<string[]>;
|
|
181
181
|
readdirSync(path: string): string[];
|
|
182
182
|
protected abstract statFileInode(inode: IndexFileInode<TIndex>): Promise<Stats>;
|
|
183
|
-
protected abstract fileForFileInode(inode: IndexFileInode<TIndex>): Promise<NoSyncFile<this>>;
|
|
184
183
|
protected abstract statFileInodeSync(inode: IndexFileInode<TIndex>): Stats;
|
|
185
|
-
protected abstract
|
|
184
|
+
protected abstract fileForFileInode(inode: IndexFileInode<TIndex>, path: string, flag: FileFlag): Promise<NoSyncFile<this>>;
|
|
185
|
+
protected abstract fileForFileInodeSync(inode: IndexFileInode<TIndex>, path: string, flag: FileFlag): NoSyncFile<this>;
|
|
186
186
|
}
|
|
187
187
|
declare const SyncFileIndexFS_base: (abstract new (...args: any[]) => {
|
|
188
188
|
metadata(): import("./filesystem.js").FileSystemMetadata;
|
|
@@ -212,7 +212,7 @@ declare const SyncFileIndexFS_base: (abstract new (...args: any[]) => {
|
|
|
212
212
|
}) & (abstract new (index: ListingTree) => FileIndexFS<unknown>);
|
|
213
213
|
export declare abstract class SyncFileIndexFS<TIndex> extends SyncFileIndexFS_base {
|
|
214
214
|
protected statFileInode(inode: IndexFileInode<TIndex>): Promise<Stats>;
|
|
215
|
-
protected fileForFileInode(inode: IndexFileInode<TIndex
|
|
215
|
+
protected fileForFileInode(inode: IndexFileInode<TIndex>, path: string, flag: FileFlag): Promise<NoSyncFile<this>>;
|
|
216
216
|
}
|
|
217
217
|
declare const AsyncFileIndexFS_base: (abstract new (...args: any[]) => {
|
|
218
218
|
metadata(): import("./filesystem.js").FileSystemMetadata;
|
package/dist/FileIndex.js
CHANGED
|
@@ -346,7 +346,7 @@ export class FileIndexFS extends Readonly(FileSystem) {
|
|
|
346
346
|
const stats = inode.stats;
|
|
347
347
|
return new NoSyncFile(this, path, flag, stats, stats.fileData);
|
|
348
348
|
}
|
|
349
|
-
return this.fileForFileInode(inode);
|
|
349
|
+
return this.fileForFileInode(inode, path, flag);
|
|
350
350
|
}
|
|
351
351
|
openFileSync(path, flag, cred) {
|
|
352
352
|
if (flag.isWriteable()) {
|
|
@@ -365,7 +365,7 @@ export class FileIndexFS extends Readonly(FileSystem) {
|
|
|
365
365
|
const stats = inode.stats;
|
|
366
366
|
return new NoSyncFile(this, path, flag, stats, stats.fileData);
|
|
367
367
|
}
|
|
368
|
-
return this.fileForFileInodeSync(inode);
|
|
368
|
+
return this.fileForFileInodeSync(inode, path, flag);
|
|
369
369
|
}
|
|
370
370
|
async readdir(path) {
|
|
371
371
|
// Check if it exists.
|
|
@@ -394,8 +394,8 @@ export class SyncFileIndexFS extends Sync((FileIndexFS)) {
|
|
|
394
394
|
async statFileInode(inode) {
|
|
395
395
|
return this.statFileInodeSync(inode);
|
|
396
396
|
}
|
|
397
|
-
async fileForFileInode(inode) {
|
|
398
|
-
return this.fileForFileInodeSync(inode);
|
|
397
|
+
async fileForFileInode(inode, path, flag) {
|
|
398
|
+
return this.fileForFileInodeSync(inode, path, flag);
|
|
399
399
|
}
|
|
400
400
|
}
|
|
401
401
|
export class AsyncFileIndexFS extends Async((FileIndexFS)) {
|