@zenfs/core 2.0.0 → 2.1.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.
- package/dist/backends/backend.js +6 -5
- package/dist/backends/cow.d.ts +2 -2
- package/dist/backends/cow.js +39 -58
- package/dist/backends/fetch.js +27 -29
- package/dist/backends/passthrough.d.ts +2 -3
- package/dist/backends/passthrough.js +84 -199
- package/dist/backends/port.d.ts +16 -3
- package/dist/backends/port.js +61 -30
- package/dist/backends/single_buffer.d.ts +52 -46
- package/dist/backends/single_buffer.js +462 -219
- package/dist/backends/store/fs.d.ts +16 -10
- package/dist/backends/store/fs.js +227 -242
- package/dist/backends/store/store.d.ts +3 -3
- package/dist/backends/store/store.js +11 -10
- package/dist/config.d.ts +2 -2
- package/dist/config.js +10 -11
- package/dist/internal/devices.d.ts +2 -2
- package/dist/internal/devices.js +39 -49
- package/dist/internal/error.d.ts +9 -204
- package/dist/internal/error.js +19 -288
- package/dist/internal/file_index.d.ts +1 -1
- package/dist/internal/file_index.js +9 -9
- package/dist/internal/filesystem.d.ts +23 -8
- package/dist/internal/index.d.ts +1 -1
- package/dist/internal/index.js +1 -1
- package/dist/internal/index_fs.d.ts +2 -2
- package/dist/internal/index_fs.js +19 -19
- package/dist/internal/inode.d.ts +81 -103
- package/dist/internal/inode.js +336 -195
- package/dist/mixins/async.js +32 -28
- package/dist/mixins/mutexed.d.ts +4 -4
- package/dist/mixins/mutexed.js +39 -39
- package/dist/mixins/readonly.d.ts +2 -2
- package/dist/mixins/readonly.js +20 -20
- package/dist/mixins/sync.js +2 -2
- package/dist/polyfills.js +1 -1
- package/dist/readline.js +1 -1
- package/dist/utils.d.ts +8 -5
- package/dist/utils.js +14 -17
- package/dist/vfs/acl.d.ts +8 -8
- package/dist/vfs/acl.js +66 -47
- package/dist/vfs/async.d.ts +2 -2
- package/dist/vfs/async.js +6 -8
- package/dist/vfs/dir.d.ts +1 -1
- package/dist/vfs/dir.js +3 -4
- package/dist/vfs/file.js +33 -24
- package/dist/vfs/flags.js +3 -3
- package/dist/vfs/ioctl.d.ts +8 -7
- package/dist/vfs/ioctl.js +132 -27
- package/dist/vfs/promises.d.ts +3 -3
- package/dist/vfs/promises.js +200 -235
- package/dist/vfs/shared.d.ts +1 -12
- package/dist/vfs/shared.js +7 -35
- package/dist/vfs/streams.js +9 -9
- package/dist/vfs/sync.d.ts +1 -2
- package/dist/vfs/sync.js +158 -170
- package/dist/vfs/watchers.js +8 -8
- package/dist/vfs/xattr.js +89 -106
- package/package.json +5 -3
- package/scripts/test.js +2 -2
- package/tests/assignment.ts +1 -1
- package/tests/backend/port.test.ts +4 -4
- package/tests/backend/single-buffer.test.ts +39 -10
- package/tests/backend/single-buffer.worker.js +30 -0
- package/tests/common/context.test.ts +2 -2
- package/tests/common/mutex.test.ts +9 -9
- package/tests/fetch/fetch.ts +1 -1
- package/tests/fetch/run.sh +1 -1
- package/tests/fs/append.test.ts +4 -4
- package/tests/fs/directory.test.ts +25 -25
- package/tests/fs/errors.test.ts +15 -19
- package/tests/fs/links.test.ts +3 -2
- package/tests/fs/open.test.ts +4 -21
- package/tests/fs/permissions.test.ts +8 -13
- package/tests/fs/read.test.ts +10 -9
- package/tests/fs/readFile.test.ts +8 -24
- package/tests/fs/rename.test.ts +4 -9
- package/tests/fs/stat.test.ts +2 -2
- package/tests/fs/times.test.ts +6 -6
- package/tests/fs/truncate.test.ts +8 -36
- package/tests/fs/watch.test.ts +10 -10
- package/tests/fs/write.test.ts +77 -13
- package/tests/fs/xattr.test.ts +7 -7
- package/tests/logs.js +2 -2
- package/tests/setup/port.ts +6 -0
- package/dist/internal/log.d.ts +0 -139
- package/dist/internal/log.js +0 -219
- package/tests/fs/writeFile.test.ts +0 -70
package/dist/vfs/ioctl.js
CHANGED
|
@@ -42,11 +42,24 @@ var __setFunctionName = (this && this.__setFunctionName) || function (f, name, p
|
|
|
42
42
|
if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
|
|
43
43
|
return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
|
|
44
44
|
};
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
46
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
47
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
48
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
49
|
+
};
|
|
50
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
51
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
52
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
53
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
54
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
55
|
+
};
|
|
56
|
+
import { Errno, Exception, setUVMessage, UV } from 'kerium';
|
|
57
|
+
import { sizeof, struct, types as t } from 'memium';
|
|
58
|
+
import { _throw } from 'utilium';
|
|
59
|
+
import { BufferView } from 'utilium/buffer.js';
|
|
47
60
|
import { Inode, InodeFlags } from '../internal/inode.js';
|
|
48
61
|
import { normalizePath } from '../utils.js';
|
|
49
|
-
import {
|
|
62
|
+
import { resolveMount } from './shared.js';
|
|
50
63
|
/*
|
|
51
64
|
* Flags for the fsxattr.xflags field
|
|
52
65
|
*/
|
|
@@ -88,11 +101,13 @@ var XFlag;
|
|
|
88
101
|
XFlag[XFlag["HasAttr"] = 2147483648] = "HasAttr";
|
|
89
102
|
})(XFlag || (XFlag = {}));
|
|
90
103
|
let fsxattr = (() => {
|
|
104
|
+
var _fsxattr_xflags_accessor_storage, _fsxattr_extsize_accessor_storage, _fsxattr_nextents_accessor_storage, _fsxattr_projid_accessor_storage, _fsxattr_cowextsize_accessor_storage, _fsxattr_pad_accessor_storage;
|
|
91
105
|
var _a, _b, _c, _d, _e;
|
|
92
106
|
let _classDecorators = [struct()];
|
|
93
107
|
let _classDescriptor;
|
|
94
108
|
let _classExtraInitializers = [];
|
|
95
109
|
let _classThis;
|
|
110
|
+
let _classSuper = BufferView;
|
|
96
111
|
let _xflags_decorators;
|
|
97
112
|
let _xflags_initializers = [];
|
|
98
113
|
let _xflags_extraInitializers = [];
|
|
@@ -111,19 +126,32 @@ let fsxattr = (() => {
|
|
|
111
126
|
let _pad_decorators;
|
|
112
127
|
let _pad_initializers = [];
|
|
113
128
|
let _pad_extraInitializers = [];
|
|
114
|
-
var fsxattr = _classThis = class {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
129
|
+
var fsxattr = _classThis = class extends _classSuper {
|
|
130
|
+
/** xflags field value */
|
|
131
|
+
get xflags() { return __classPrivateFieldGet(this, _fsxattr_xflags_accessor_storage, "f"); }
|
|
132
|
+
set xflags(value) { __classPrivateFieldSet(this, _fsxattr_xflags_accessor_storage, value, "f"); }
|
|
133
|
+
/** extsize field value */
|
|
134
|
+
get extsize() { return __classPrivateFieldGet(this, _fsxattr_extsize_accessor_storage, "f"); }
|
|
135
|
+
set extsize(value) { __classPrivateFieldSet(this, _fsxattr_extsize_accessor_storage, value, "f"); }
|
|
136
|
+
/** nextents field value */
|
|
137
|
+
get nextents() { return __classPrivateFieldGet(this, _fsxattr_nextents_accessor_storage, "f"); }
|
|
138
|
+
set nextents(value) { __classPrivateFieldSet(this, _fsxattr_nextents_accessor_storage, value, "f"); }
|
|
139
|
+
/** project identifier */
|
|
140
|
+
get projid() { return __classPrivateFieldGet(this, _fsxattr_projid_accessor_storage, "f"); }
|
|
141
|
+
set projid(value) { __classPrivateFieldSet(this, _fsxattr_projid_accessor_storage, value, "f"); }
|
|
142
|
+
/** CoW extsize field value */
|
|
143
|
+
get cowextsize() { return __classPrivateFieldGet(this, _fsxattr_cowextsize_accessor_storage, "f"); }
|
|
144
|
+
set cowextsize(value) { __classPrivateFieldSet(this, _fsxattr_cowextsize_accessor_storage, value, "f"); }
|
|
145
|
+
get pad() { return __classPrivateFieldGet(this, _fsxattr_pad_accessor_storage, "f"); }
|
|
146
|
+
set pad(value) { __classPrivateFieldSet(this, _fsxattr_pad_accessor_storage, value, "f"); }
|
|
147
|
+
constructor(inode = _throw(new Exception(Errno.EINVAL, 'fsxattr must be initialized with an inode'))) {
|
|
148
|
+
super(new ArrayBuffer(sizeof(fsxattr)));
|
|
149
|
+
_fsxattr_xflags_accessor_storage.set(this, __runInitializers(this, _xflags_initializers, void 0));
|
|
150
|
+
_fsxattr_extsize_accessor_storage.set(this, (__runInitializers(this, _xflags_extraInitializers), __runInitializers(this, _extsize_initializers, void 0)));
|
|
151
|
+
_fsxattr_nextents_accessor_storage.set(this, (__runInitializers(this, _extsize_extraInitializers), __runInitializers(this, _nextents_initializers, void 0)));
|
|
152
|
+
_fsxattr_projid_accessor_storage.set(this, (__runInitializers(this, _nextents_extraInitializers), __runInitializers(this, _projid_initializers, void 0)));
|
|
153
|
+
_fsxattr_cowextsize_accessor_storage.set(this, (__runInitializers(this, _projid_extraInitializers), __runInitializers(this, _cowextsize_initializers, void 0)));
|
|
154
|
+
_fsxattr_pad_accessor_storage.set(this, (__runInitializers(this, _cowextsize_extraInitializers), __runInitializers(this, _pad_initializers, [])));
|
|
127
155
|
__runInitializers(this, _pad_extraInitializers);
|
|
128
156
|
this.extsize = inode.size;
|
|
129
157
|
this.nextents = 1;
|
|
@@ -137,21 +165,28 @@ let fsxattr = (() => {
|
|
|
137
165
|
}
|
|
138
166
|
}
|
|
139
167
|
};
|
|
168
|
+
_fsxattr_xflags_accessor_storage = new WeakMap();
|
|
169
|
+
_fsxattr_extsize_accessor_storage = new WeakMap();
|
|
170
|
+
_fsxattr_nextents_accessor_storage = new WeakMap();
|
|
171
|
+
_fsxattr_projid_accessor_storage = new WeakMap();
|
|
172
|
+
_fsxattr_cowextsize_accessor_storage = new WeakMap();
|
|
173
|
+
_fsxattr_pad_accessor_storage = new WeakMap();
|
|
140
174
|
__setFunctionName(_classThis, "fsxattr");
|
|
141
175
|
(() => {
|
|
142
|
-
|
|
176
|
+
var _a;
|
|
177
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create((_a = _classSuper[Symbol.metadata]) !== null && _a !== void 0 ? _a : null) : void 0;
|
|
143
178
|
_xflags_decorators = [(_a = t).uint32.bind(_a)];
|
|
144
179
|
_extsize_decorators = [(_b = t).uint32.bind(_b)];
|
|
145
180
|
_nextents_decorators = [(_c = t).uint32.bind(_c)];
|
|
146
181
|
_projid_decorators = [(_d = t).uint32.bind(_d)];
|
|
147
182
|
_cowextsize_decorators = [(_e = t).uint32.bind(_e)];
|
|
148
183
|
_pad_decorators = [t.char(8)];
|
|
149
|
-
__esDecorate(
|
|
150
|
-
__esDecorate(
|
|
151
|
-
__esDecorate(
|
|
152
|
-
__esDecorate(
|
|
153
|
-
__esDecorate(
|
|
154
|
-
__esDecorate(
|
|
184
|
+
__esDecorate(_classThis, null, _xflags_decorators, { kind: "accessor", name: "xflags", static: false, private: false, access: { has: obj => "xflags" in obj, get: obj => obj.xflags, set: (obj, value) => { obj.xflags = value; } }, metadata: _metadata }, _xflags_initializers, _xflags_extraInitializers);
|
|
185
|
+
__esDecorate(_classThis, null, _extsize_decorators, { kind: "accessor", name: "extsize", static: false, private: false, access: { has: obj => "extsize" in obj, get: obj => obj.extsize, set: (obj, value) => { obj.extsize = value; } }, metadata: _metadata }, _extsize_initializers, _extsize_extraInitializers);
|
|
186
|
+
__esDecorate(_classThis, null, _nextents_decorators, { kind: "accessor", name: "nextents", static: false, private: false, access: { has: obj => "nextents" in obj, get: obj => obj.nextents, set: (obj, value) => { obj.nextents = value; } }, metadata: _metadata }, _nextents_initializers, _nextents_extraInitializers);
|
|
187
|
+
__esDecorate(_classThis, null, _projid_decorators, { kind: "accessor", name: "projid", static: false, private: false, access: { has: obj => "projid" in obj, get: obj => obj.projid, set: (obj, value) => { obj.projid = value; } }, metadata: _metadata }, _projid_initializers, _projid_extraInitializers);
|
|
188
|
+
__esDecorate(_classThis, null, _cowextsize_decorators, { kind: "accessor", name: "cowextsize", static: false, private: false, access: { has: obj => "cowextsize" in obj, get: obj => obj.cowextsize, set: (obj, value) => { obj.cowextsize = value; } }, metadata: _metadata }, _cowextsize_initializers, _cowextsize_extraInitializers);
|
|
189
|
+
__esDecorate(_classThis, null, _pad_decorators, { kind: "accessor", name: "pad", static: false, private: false, access: { has: obj => "pad" in obj, get: obj => obj.pad, set: (obj, value) => { obj.pad = value; } }, metadata: _metadata }, _pad_initializers, _pad_extraInitializers);
|
|
155
190
|
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
156
191
|
fsxattr = _classThis = _classDescriptor.value;
|
|
157
192
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
@@ -159,6 +194,76 @@ let fsxattr = (() => {
|
|
|
159
194
|
})();
|
|
160
195
|
return fsxattr = _classThis;
|
|
161
196
|
})();
|
|
197
|
+
/**
|
|
198
|
+
* Inode flags (FS_IOC_GETFLAGS / FS_IOC_SETFLAGS)
|
|
199
|
+
* @see `FS_*_FL` in `include/uapi/linux/fs.h` (around L250)
|
|
200
|
+
* @experimental
|
|
201
|
+
*/
|
|
202
|
+
var FileFlag;
|
|
203
|
+
(function (FileFlag) {
|
|
204
|
+
/** Secure deletion */
|
|
205
|
+
FileFlag[FileFlag["SecureRm"] = 1] = "SecureRm";
|
|
206
|
+
/** Undelete */
|
|
207
|
+
FileFlag[FileFlag["Undelete"] = 2] = "Undelete";
|
|
208
|
+
/** Compress file */
|
|
209
|
+
FileFlag[FileFlag["Compress"] = 4] = "Compress";
|
|
210
|
+
/** Synchronous updates */
|
|
211
|
+
FileFlag[FileFlag["Sync"] = 8] = "Sync";
|
|
212
|
+
/** Immutable file */
|
|
213
|
+
FileFlag[FileFlag["Immutable"] = 16] = "Immutable";
|
|
214
|
+
/** Writes to file may only append */
|
|
215
|
+
FileFlag[FileFlag["Append"] = 32] = "Append";
|
|
216
|
+
/** do not dump file */
|
|
217
|
+
FileFlag[FileFlag["NoDump"] = 64] = "NoDump";
|
|
218
|
+
/** do not update atime */
|
|
219
|
+
FileFlag[FileFlag["NoAtime"] = 128] = "NoAtime";
|
|
220
|
+
// Reserved for compression usage...
|
|
221
|
+
FileFlag[FileFlag["Dirty"] = 256] = "Dirty";
|
|
222
|
+
/** One or more compressed clusters */
|
|
223
|
+
FileFlag[FileFlag["CompressBlk"] = 512] = "CompressBlk";
|
|
224
|
+
/** Don't compress */
|
|
225
|
+
FileFlag[FileFlag["NoCompress"] = 1024] = "NoCompress";
|
|
226
|
+
// End compression flags --- maybe not all used
|
|
227
|
+
/** Encrypted file */
|
|
228
|
+
FileFlag[FileFlag["Encrypt"] = 2048] = "Encrypt";
|
|
229
|
+
/** btree format dir */
|
|
230
|
+
FileFlag[FileFlag["Btree"] = 4096] = "Btree";
|
|
231
|
+
/** hash-indexed directory */
|
|
232
|
+
// eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values
|
|
233
|
+
FileFlag[FileFlag["Index"] = 4096] = "Index";
|
|
234
|
+
/** AFS directory */
|
|
235
|
+
FileFlag[FileFlag["IMagic"] = 8192] = "IMagic";
|
|
236
|
+
/** Reserved for ext3 */
|
|
237
|
+
FileFlag[FileFlag["JournalData"] = 16384] = "JournalData";
|
|
238
|
+
/** file tail should not be merged */
|
|
239
|
+
FileFlag[FileFlag["NoTail"] = 32768] = "NoTail";
|
|
240
|
+
/** dirsync behaviour (directories only) */
|
|
241
|
+
FileFlag[FileFlag["DirSync"] = 65536] = "DirSync";
|
|
242
|
+
/** Top of directory hierarchies*/
|
|
243
|
+
FileFlag[FileFlag["TopDir"] = 131072] = "TopDir";
|
|
244
|
+
/** Reserved for ext4 */
|
|
245
|
+
FileFlag[FileFlag["HugeFile"] = 262144] = "HugeFile";
|
|
246
|
+
/** Extents */
|
|
247
|
+
FileFlag[FileFlag["Extent"] = 524288] = "Extent";
|
|
248
|
+
/** Verity protected inode */
|
|
249
|
+
FileFlag[FileFlag["Verity"] = 1048576] = "Verity";
|
|
250
|
+
/** Inode used for large EA */
|
|
251
|
+
FileFlag[FileFlag["EaInode"] = 2097152] = "EaInode";
|
|
252
|
+
/** Reserved for ext4 */
|
|
253
|
+
FileFlag[FileFlag["EofBlocks"] = 4194304] = "EofBlocks";
|
|
254
|
+
/** Do not cow file */
|
|
255
|
+
FileFlag[FileFlag["NoCow"] = 8388608] = "NoCow";
|
|
256
|
+
/** Inode is DAX */
|
|
257
|
+
FileFlag[FileFlag["Dax"] = 33554432] = "Dax";
|
|
258
|
+
/** Reserved for ext4 */
|
|
259
|
+
FileFlag[FileFlag["InlineData"] = 268435456] = "InlineData";
|
|
260
|
+
/** Create with parents projid */
|
|
261
|
+
FileFlag[FileFlag["ProjInherit"] = 536870912] = "ProjInherit";
|
|
262
|
+
/** Folder is case insensitive */
|
|
263
|
+
FileFlag[FileFlag["CaseFold"] = 1073741824] = "CaseFold";
|
|
264
|
+
/** reserved for ext2 lib */
|
|
265
|
+
FileFlag[FileFlag["Reserved"] = 2147483648] = "Reserved";
|
|
266
|
+
})(FileFlag || (FileFlag = {}));
|
|
162
267
|
/**
|
|
163
268
|
* `FS_IOC_*` commands for {@link ioctl | `ioctl`}
|
|
164
269
|
* @remarks
|
|
@@ -242,9 +347,9 @@ command,
|
|
|
242
347
|
}
|
|
243
348
|
}
|
|
244
349
|
catch (e) {
|
|
245
|
-
throw
|
|
350
|
+
throw setUVMessage(Object.assign(e, { syscall: 'ioctl', path }));
|
|
246
351
|
}
|
|
247
|
-
throw
|
|
352
|
+
throw UV('ENOTSUP', 'ioctl', path);
|
|
248
353
|
}
|
|
249
354
|
/** Perform an `ioctl` on a file or file system */
|
|
250
355
|
export function ioctlSync(
|
|
@@ -298,7 +403,7 @@ command,
|
|
|
298
403
|
}
|
|
299
404
|
}
|
|
300
405
|
catch (e) {
|
|
301
|
-
throw
|
|
406
|
+
throw setUVMessage(Object.assign(e, { syscall: 'ioctl', path }));
|
|
302
407
|
}
|
|
303
|
-
throw
|
|
408
|
+
throw UV('ENOTSUP', 'ioctl', path);
|
|
304
409
|
}
|
package/dist/vfs/promises.d.ts
CHANGED
|
@@ -322,14 +322,14 @@ export declare function readdir(this: V_Context, path: fs.PathLike, options: Rea
|
|
|
322
322
|
withFileTypes: true;
|
|
323
323
|
}>): Promise<Dirent[]>;
|
|
324
324
|
export declare function readdir(this: V_Context, path: fs.PathLike, options?: ReaddirOptsU<fs.BufferEncodingOption> | NullEnc): Promise<string[] | Dirent[] | Buffer[]>;
|
|
325
|
-
export declare function link(this: V_Context,
|
|
325
|
+
export declare function link(this: V_Context, path: fs.PathLike, dest: fs.PathLike): Promise<void>;
|
|
326
326
|
/**
|
|
327
327
|
* `symlink`.
|
|
328
|
-
* @param
|
|
328
|
+
* @param dest target path
|
|
329
329
|
* @param path link path
|
|
330
330
|
* @param type can be either `'dir'` or `'file'` (default is `'file'`)
|
|
331
331
|
*/
|
|
332
|
-
export declare function symlink(this: V_Context,
|
|
332
|
+
export declare function symlink(this: V_Context, dest: fs.PathLike, path: fs.PathLike, type?: fs.symlink.Type | string | null): Promise<void>;
|
|
333
333
|
export declare function readlink(this: V_Context, path: fs.PathLike, options: fs.BufferEncodingOption): Promise<Buffer>;
|
|
334
334
|
export declare function readlink(this: V_Context, path: fs.PathLike, options?: fs.EncodingOption | null): Promise<string>;
|
|
335
335
|
export declare function readlink(this: V_Context, path: fs.PathLike, options?: fs.BufferEncodingOption | fs.EncodingOption | string | null): Promise<string | Buffer>;
|