@zenfs/core 0.12.1 → 0.12.2
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/backends/index/fs.d.ts +1 -0
- package/dist/backends/overlay.js +1 -1
- package/dist/backends/port/fs.d.ts +1 -0
- package/dist/browser.min.js +4 -8
- package/dist/browser.min.js.map +3 -3
- package/dist/emulation/async.d.ts +4 -4
- package/dist/emulation/index.d.ts +1 -1
- package/dist/emulation/index.js +1 -1
- package/dist/emulation/promises.d.ts +4 -4
- package/dist/emulation/promises.js +33 -45
- package/dist/emulation/shared.d.ts +6 -0
- package/dist/emulation/shared.js +19 -1
- package/dist/emulation/sync.d.ts +4 -4
- package/dist/emulation/sync.js +86 -60
- package/dist/file.d.ts +5 -10
- package/dist/file.js +30 -47
- package/dist/filesystem.d.ts +23 -1
- package/dist/filesystem.js +2 -2
- package/dist/stats.d.ts +16 -16
- package/dist/stats.js +42 -49
- package/package.json +1 -1
- package/src/backends/overlay.ts +1 -1
- package/src/emulation/async.ts +6 -6
- package/src/emulation/index.ts +1 -1
- package/src/emulation/promises.ts +39 -48
- package/src/emulation/shared.ts +22 -1
- package/src/emulation/sync.ts +89 -71
- package/src/file.ts +30 -49
- package/src/filesystem.ts +29 -2
- package/src/stats.ts +46 -58
|
@@ -19,6 +19,7 @@ declare const IndexFS_base: (abstract new (...args: any[]) => {
|
|
|
19
19
|
linkSync(srcpath: string, dstpath: string, cred: Cred): void;
|
|
20
20
|
sync(path: string, data: Uint8Array, stats: Readonly<Stats>): Promise<void>;
|
|
21
21
|
syncSync(path: string, data: Uint8Array, stats: Readonly<Stats>): void;
|
|
22
|
+
_type?: number | undefined;
|
|
22
23
|
ready(): Promise<void>;
|
|
23
24
|
stat(path: string, cred: Cred): Promise<Stats>;
|
|
24
25
|
statSync(path: string, cred: Cred): Stats;
|
package/dist/backends/overlay.js
CHANGED
|
@@ -166,7 +166,7 @@ export class UnlockedOverlayFS extends FileSystem {
|
|
|
166
166
|
}
|
|
167
167
|
// Create an OverlayFile.
|
|
168
168
|
const file = this._readable.openFileSync(path, parseFlag('r'), cred);
|
|
169
|
-
const stats = Stats
|
|
169
|
+
const stats = new Stats(file.statSync());
|
|
170
170
|
const data = new Uint8Array(stats.size);
|
|
171
171
|
file.readSync(data);
|
|
172
172
|
return new PreloadFile(this, path, flag, stats, data);
|
|
@@ -55,6 +55,7 @@ declare const PortFS_base: (abstract new (...args: any[]) => {
|
|
|
55
55
|
readdirSync(path: string, cred: Cred): string[];
|
|
56
56
|
linkSync(srcpath: string, dstpath: string, cred: Cred): void;
|
|
57
57
|
syncSync(path: string, data: Uint8Array, stats: Readonly<Stats>): void;
|
|
58
|
+
_type?: number | undefined;
|
|
58
59
|
rename(oldPath: string, newPath: string, cred: Cred): Promise<void>;
|
|
59
60
|
stat(path: string, cred: Cred): Promise<Stats>;
|
|
60
61
|
openFile(path: string, flag: string, cred: Cred): Promise<File>;
|