@zenfs/core 0.3.0 → 0.3.1

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.
@@ -154,6 +154,7 @@ export declare class IndexDirInode<T> extends IndexInode<T> {
154
154
  remove(p: string): IndexInode<T> | null;
155
155
  }
156
156
  declare const FileIndexFS_base: (abstract new (...args: any[]) => {
157
+ readonly metadata: import("./filesystem.js").FileSystemMetadata;
157
158
  rename(oldPath: string, newPath: string, cred: Cred): Promise<void>;
158
159
  renameSync(oldPath: string, newPath: string, cred: Cred): void;
159
160
  createFile(path: string, flag: FileFlag, mode: number, cred: Cred): Promise<import("./file.js").File>;
@@ -168,16 +169,6 @@ declare const FileIndexFS_base: (abstract new (...args: any[]) => {
168
169
  linkSync(srcpath: string, dstpath: string, cred: Cred): void;
169
170
  sync(path: string, data: Uint8Array, stats: Readonly<Stats>): Promise<void>;
170
171
  syncSync(path: string, data: Uint8Array, stats: Readonly<Stats>): void;
171
- readonly metadata: import("./filesystem.js").FileSystemMetadata;
172
- ready(): Promise<any>;
173
- stat(path: string, cred: Cred): Promise<Stats>;
174
- statSync(path: string, cred: Cred): Stats;
175
- openFile(path: string, flag: FileFlag, cred: Cred): Promise<import("./file.js").File>;
176
- openFileSync(path: string, flag: FileFlag, cred: Cred): import("./file.js").File;
177
- readdir(path: string, cred: Cred): Promise<string[]>;
178
- readdirSync(path: string, cred: Cred): string[];
179
- exists(path: string, cred: Cred): Promise<boolean>;
180
- existsSync(path: string, cred: Cred): boolean;
181
172
  }) & typeof FileSystem;
182
173
  export declare abstract class FileIndexFS<TIndex> extends FileIndexFS_base {
183
174
  protected _index: FileIndex<TIndex>;
@@ -224,6 +215,7 @@ export declare abstract class SyncFileIndexFS<TIndex> extends SyncFileIndexFS_ba
224
215
  protected fileForFileInode(inode: IndexFileInode<TIndex>): Promise<NoSyncFile<this>>;
225
216
  }
226
217
  declare const AsyncFileIndexFS_base: (abstract new (...args: any[]) => {
218
+ readonly metadata: import("./filesystem.js").FileSystemMetadata;
227
219
  renameSync(oldPath: string, newPath: string, cred: Cred): void;
228
220
  statSync(path: string, cred: Cred): Stats;
229
221
  createFileSync(path: string, flag: FileFlag, mode: number, cred: Cred): import("./file.js").File;
@@ -234,20 +226,6 @@ declare const AsyncFileIndexFS_base: (abstract new (...args: any[]) => {
234
226
  readdirSync(path: string, cred: Cred): string[];
235
227
  linkSync(srcpath: string, dstpath: string, cred: Cred): void;
236
228
  syncSync(path: string, data: Uint8Array, stats: Readonly<Stats>): void;
237
- readonly metadata: import("./filesystem.js").FileSystemMetadata;
238
- ready(): Promise<any>;
239
- rename(oldPath: string, newPath: string, cred: Cred): Promise<void>;
240
- stat(path: string, cred: Cred): Promise<Stats>;
241
- openFile(path: string, flag: FileFlag, cred: Cred): Promise<import("./file.js").File>;
242
- createFile(path: string, flag: FileFlag, mode: number, cred: Cred): Promise<import("./file.js").File>;
243
- unlink(path: string, cred: Cred): Promise<void>;
244
- rmdir(path: string, cred: Cred): Promise<void>;
245
- mkdir(path: string, mode: number, cred: Cred): Promise<void>;
246
- readdir(path: string, cred: Cred): Promise<string[]>;
247
- exists(path: string, cred: Cred): Promise<boolean>;
248
- existsSync(path: string, cred: Cred): boolean;
249
- link(srcpath: string, dstpath: string, cred: Cred): Promise<void>;
250
- sync(path: string, data: Uint8Array, stats: Readonly<Stats>): Promise<void>;
251
229
  }) & (abstract new (index: ListingTree) => FileIndexFS<unknown>);
252
230
  export declare abstract class AsyncFileIndexFS<TIndex> extends AsyncFileIndexFS_base {
253
231
  protected statFileInodeSync(): Stats;
@@ -35,9 +35,6 @@ declare const AsyncMirrorFS_base: (abstract new (...args: any[]) => {
35
35
  rename(oldPath: string, newPath: string, cred: Cred): Promise<void>;
36
36
  stat(path: string, cred: Cred): Promise<Stats>;
37
37
  createFile(path: string, flag: FileFlag, mode: number, cred: Cred): Promise<File>;
38
- /**
39
- * @internal
40
- */
41
38
  openFile(path: string, flag: FileFlag, cred: Cred): Promise<File>;
42
39
  unlink(path: string, cred: Cred): Promise<void>;
43
40
  rmdir(path: string, cred: Cred): Promise<void>;
@@ -80,6 +80,7 @@ export interface AsyncStoreFileSystemOptions {
80
80
  cacheSize?: number;
81
81
  }
82
82
  declare const AsyncStoreFileSystem_base: (abstract new (...args: any[]) => {
83
+ readonly metadata: FileSystemMetadata;
83
84
  renameSync(oldPath: string, newPath: string, cred: Cred): void;
84
85
  statSync(path: string, cred: Cred): Stats;
85
86
  createFileSync(path: string, flag: FileFlag, mode: number, cred: Cred): File;
@@ -90,20 +91,6 @@ declare const AsyncStoreFileSystem_base: (abstract new (...args: any[]) => {
90
91
  readdirSync(path: string, cred: Cred): string[];
91
92
  linkSync(srcpath: string, dstpath: string, cred: Cred): void;
92
93
  syncSync(path: string, data: Uint8Array, stats: Readonly<Stats>): void;
93
- readonly metadata: FileSystemMetadata;
94
- ready(): Promise<any>;
95
- rename(oldPath: string, newPath: string, cred: Cred): Promise<void>;
96
- stat(path: string, cred: Cred): Promise<Stats>;
97
- openFile(path: string, flag: FileFlag, cred: Cred): Promise<File>;
98
- createFile(path: string, flag: FileFlag, mode: number, cred: Cred): Promise<File>;
99
- unlink(path: string, cred: Cred): Promise<void>;
100
- rmdir(path: string, cred: Cred): Promise<void>;
101
- mkdir(path: string, mode: number, cred: Cred): Promise<void>;
102
- readdir(path: string, cred: Cred): Promise<string[]>;
103
- exists(path: string, cred: Cred): Promise<boolean>;
104
- existsSync(path: string, cred: Cred): boolean;
105
- link(srcpath: string, dstpath: string, cred: Cred): Promise<void>;
106
- sync(path: string, data: Uint8Array, stats: Readonly<Stats>): Promise<void>;
107
94
  }) & typeof FileSystem;
108
95
  /**
109
96
  * An "Asynchronous key-value file system". Stores data to/retrieves data from
@@ -73,6 +73,7 @@ export class AsyncStoreFileSystem extends Async(FileSystem) {
73
73
  ready() {
74
74
  return this._ready;
75
75
  }
76
+ // @ts-expect-error 2611
76
77
  get metadata() {
77
78
  return {
78
79
  ...super.metadata,