@zenfs/core 2.0.0 → 2.1.0

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.
Files changed (87) hide show
  1. package/dist/backends/backend.js +6 -5
  2. package/dist/backends/cow.d.ts +2 -2
  3. package/dist/backends/cow.js +39 -58
  4. package/dist/backends/fetch.js +27 -29
  5. package/dist/backends/passthrough.d.ts +2 -3
  6. package/dist/backends/passthrough.js +84 -199
  7. package/dist/backends/port.d.ts +16 -3
  8. package/dist/backends/port.js +61 -30
  9. package/dist/backends/single_buffer.d.ts +52 -46
  10. package/dist/backends/single_buffer.js +462 -219
  11. package/dist/backends/store/fs.d.ts +16 -10
  12. package/dist/backends/store/fs.js +227 -242
  13. package/dist/backends/store/store.d.ts +3 -3
  14. package/dist/backends/store/store.js +11 -10
  15. package/dist/config.d.ts +2 -2
  16. package/dist/config.js +10 -11
  17. package/dist/internal/devices.d.ts +2 -2
  18. package/dist/internal/devices.js +39 -49
  19. package/dist/internal/error.d.ts +9 -204
  20. package/dist/internal/error.js +19 -288
  21. package/dist/internal/file_index.d.ts +1 -1
  22. package/dist/internal/file_index.js +9 -9
  23. package/dist/internal/filesystem.d.ts +23 -8
  24. package/dist/internal/index.d.ts +1 -1
  25. package/dist/internal/index.js +1 -1
  26. package/dist/internal/index_fs.d.ts +2 -2
  27. package/dist/internal/index_fs.js +19 -19
  28. package/dist/internal/inode.d.ts +81 -103
  29. package/dist/internal/inode.js +336 -195
  30. package/dist/mixins/async.js +32 -28
  31. package/dist/mixins/mutexed.d.ts +4 -4
  32. package/dist/mixins/mutexed.js +39 -39
  33. package/dist/mixins/readonly.d.ts +2 -2
  34. package/dist/mixins/readonly.js +20 -20
  35. package/dist/mixins/sync.js +2 -2
  36. package/dist/polyfills.js +1 -1
  37. package/dist/readline.js +1 -1
  38. package/dist/utils.d.ts +8 -5
  39. package/dist/utils.js +14 -17
  40. package/dist/vfs/acl.d.ts +8 -8
  41. package/dist/vfs/acl.js +66 -47
  42. package/dist/vfs/async.d.ts +2 -2
  43. package/dist/vfs/async.js +6 -8
  44. package/dist/vfs/dir.d.ts +1 -1
  45. package/dist/vfs/dir.js +3 -4
  46. package/dist/vfs/file.js +33 -24
  47. package/dist/vfs/flags.js +3 -3
  48. package/dist/vfs/ioctl.d.ts +8 -7
  49. package/dist/vfs/ioctl.js +132 -27
  50. package/dist/vfs/promises.d.ts +3 -3
  51. package/dist/vfs/promises.js +200 -235
  52. package/dist/vfs/shared.d.ts +1 -12
  53. package/dist/vfs/shared.js +7 -35
  54. package/dist/vfs/streams.js +9 -9
  55. package/dist/vfs/sync.d.ts +1 -2
  56. package/dist/vfs/sync.js +158 -170
  57. package/dist/vfs/watchers.js +8 -8
  58. package/dist/vfs/xattr.js +89 -106
  59. package/package.json +4 -2
  60. package/scripts/test.js +2 -2
  61. package/tests/assignment.ts +1 -1
  62. package/tests/backend/port.test.ts +4 -4
  63. package/tests/backend/single-buffer.test.ts +39 -10
  64. package/tests/backend/single-buffer.worker.js +30 -0
  65. package/tests/common/context.test.ts +2 -2
  66. package/tests/common/mutex.test.ts +9 -9
  67. package/tests/fetch/fetch.ts +1 -1
  68. package/tests/fs/append.test.ts +4 -4
  69. package/tests/fs/directory.test.ts +25 -25
  70. package/tests/fs/errors.test.ts +15 -19
  71. package/tests/fs/links.test.ts +3 -2
  72. package/tests/fs/open.test.ts +4 -21
  73. package/tests/fs/permissions.test.ts +8 -13
  74. package/tests/fs/read.test.ts +10 -9
  75. package/tests/fs/readFile.test.ts +8 -24
  76. package/tests/fs/rename.test.ts +4 -9
  77. package/tests/fs/stat.test.ts +2 -2
  78. package/tests/fs/times.test.ts +6 -6
  79. package/tests/fs/truncate.test.ts +8 -36
  80. package/tests/fs/watch.test.ts +10 -10
  81. package/tests/fs/write.test.ts +77 -13
  82. package/tests/fs/xattr.test.ts +7 -7
  83. package/tests/logs.js +2 -2
  84. package/tests/setup/port.ts +6 -0
  85. package/dist/internal/log.d.ts +0 -139
  86. package/dist/internal/log.js +0 -219
  87. 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
- import { _throw, struct, types as t } from 'utilium';
46
- import { Errno, ErrnoError } from '../internal/error.js';
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 { fixError, resolveMount } from './shared.js';
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
- constructor(inode = _throw(new ErrnoError(Errno.EINVAL, 'fsxattr must be initialized with an inode'))) {
116
- /** xflags field value */
117
- this.xflags = __runInitializers(this, _xflags_initializers, 0);
118
- /** extsize field value */
119
- this.extsize = (__runInitializers(this, _xflags_extraInitializers), __runInitializers(this, _extsize_initializers, 0));
120
- /** nextents field value */
121
- this.nextents = (__runInitializers(this, _extsize_extraInitializers), __runInitializers(this, _nextents_initializers, 0));
122
- /** project identifier */
123
- this.projid = (__runInitializers(this, _nextents_extraInitializers), __runInitializers(this, _projid_initializers, 0));
124
- /** CoW extsize field value */
125
- this.cowextsize = (__runInitializers(this, _projid_extraInitializers), __runInitializers(this, _cowextsize_initializers, 0));
126
- this.pad = (__runInitializers(this, _cowextsize_extraInitializers), __runInitializers(this, _pad_initializers, []));
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
- const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
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(null, null, _xflags_decorators, { kind: "field", 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);
150
- __esDecorate(null, null, _extsize_decorators, { kind: "field", 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);
151
- __esDecorate(null, null, _nextents_decorators, { kind: "field", 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);
152
- __esDecorate(null, null, _projid_decorators, { kind: "field", 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);
153
- __esDecorate(null, null, _cowextsize_decorators, { kind: "field", 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);
154
- __esDecorate(null, null, _pad_decorators, { kind: "field", 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);
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 fixError(e, { [resolved]: path });
350
+ throw setUVMessage(Object.assign(e, { syscall: 'ioctl', path }));
246
351
  }
247
- throw new ErrnoError(Errno.ENOTSUP, 'Unsupported command: ' + command, path, 'ioctl');
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 fixError(e, { [resolved]: path });
406
+ throw setUVMessage(Object.assign(e, { syscall: 'ioctl', path }));
302
407
  }
303
- throw new ErrnoError(Errno.ENOTSUP, 'Unsupported command: ' + command, path, 'ioctl');
408
+ throw UV('ENOTSUP', 'ioctl', path);
304
409
  }
@@ -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, targetPath: fs.PathLike, linkPath: fs.PathLike): Promise<void>;
325
+ export declare function link(this: V_Context, path: fs.PathLike, dest: fs.PathLike): Promise<void>;
326
326
  /**
327
327
  * `symlink`.
328
- * @param target target path
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, target: fs.PathLike, path: fs.PathLike, type?: fs.symlink.Type | string | null): Promise<void>;
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>;