@poe-platform/safe-fs 0.1.42 → 0.1.44
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.
|
@@ -77,9 +77,12 @@ export class MountFileSystem {
|
|
|
77
77
|
const streaming = (capability, method) => all(capability, [method]) ? true : mounts.some(({ backend }) => backend.capabilities[capability] !== false && typeof backend[method] === "function") ? undefined : false;
|
|
78
78
|
const streamingRead = streaming("streamingRead", "readStream");
|
|
79
79
|
const streamingWrite = streaming("streamingWrite", "writeStream");
|
|
80
|
+
const append = all("append") ? true
|
|
81
|
+
: mounts.every(({ backend }) => backend.capabilities.append === false) ? false : undefined;
|
|
80
82
|
this.capabilities = Object.freeze({
|
|
81
83
|
get snapshotRmdir() { return mounts.some(({ backend }) => backend.capabilities.snapshotRmdir === true); },
|
|
82
84
|
readOnly: all("readOnly"),
|
|
85
|
+
...(append === undefined ? {} : { append }),
|
|
83
86
|
symlinks: all("symlinks", ["readlink", "symlink"]),
|
|
84
87
|
hardlinks: all("hardlinks", ["link"]),
|
|
85
88
|
permissions: all("permissions", ["chmod"]),
|
|
@@ -81,8 +81,11 @@ export class OverlayFileSystem {
|
|
|
81
81
|
&& this.#upper.capabilities.streamingRead === true
|
|
82
82
|
&& typeof this.#upper.writeStream === "function" && typeof this.#upper.readStream === "function"
|
|
83
83
|
? readable.every((capability) => capability === true) ? true : undefined : false;
|
|
84
|
+
const append = !writable || this.#upper.capabilities.append === false ? false
|
|
85
|
+
: this.#upper.capabilities.append === true ? true : undefined;
|
|
84
86
|
this.capabilities = Object.freeze({
|
|
85
87
|
readOnly: !writable,
|
|
88
|
+
...(append === undefined ? {} : { append }),
|
|
86
89
|
atomicRename: false,
|
|
87
90
|
hardlinks: false,
|
|
88
91
|
symlinks: writable && this.#upper.capabilities.symlinks === true
|
|
@@ -28,6 +28,7 @@ export class ReadOnlyFileSystem {
|
|
|
28
28
|
const streamingRead = typeof filesystem.readStream === "function" ? filesystem.capabilities.streamingRead : false;
|
|
29
29
|
this.#capabilities = Object.freeze({
|
|
30
30
|
readOnly: true,
|
|
31
|
+
append: false,
|
|
31
32
|
symlinks: filesystem.capabilities.symlinks === true && typeof filesystem.readlink === "function",
|
|
32
33
|
hardlinks: false,
|
|
33
34
|
permissions: false,
|