@zenfs/core 1.3.6 → 1.4.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.
- package/dist/backends/memory.d.ts +4 -4
- package/dist/backends/memory.js +4 -4
- package/dist/backends/overlay.d.ts +5 -2
- package/dist/backends/overlay.js +7 -10
- package/dist/backends/port/fs.js +1 -4
- package/dist/config.js +4 -8
- package/dist/context.d.ts +32 -0
- package/dist/context.js +23 -0
- package/dist/credentials.d.ts +5 -5
- package/dist/credentials.js +10 -6
- package/dist/emulation/async.d.ts +90 -89
- package/dist/emulation/async.js +76 -75
- package/dist/emulation/dir.d.ts +3 -1
- package/dist/emulation/dir.js +6 -7
- package/dist/emulation/index.d.ts +1 -1
- package/dist/emulation/index.js +1 -1
- package/dist/emulation/promises.d.ts +50 -48
- package/dist/emulation/promises.js +78 -77
- package/dist/emulation/shared.d.ts +35 -8
- package/dist/emulation/shared.js +37 -11
- package/dist/emulation/sync.d.ts +63 -62
- package/dist/emulation/sync.js +72 -73
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/stats.d.ts +2 -1
- package/dist/stats.js +5 -4
- package/package.json +3 -5
- package/scripts/test.js +78 -17
- package/tests/assignment.ts +1 -1
- package/tests/common/context.test.ts +19 -0
- package/tests/{devices.test.ts → common/devices.test.ts} +3 -3
- package/tests/{handle.test.ts → common/handle.test.ts} +1 -1
- package/tests/common/mounts.test.ts +36 -0
- package/tests/{mutex.test.ts → common/mutex.test.ts} +3 -3
- package/tests/common/path.test.ts +34 -0
- package/tests/common.ts +4 -3
- package/tests/fs/dir.test.ts +11 -11
- package/tests/fs/directory.test.ts +17 -17
- package/tests/fs/errors.test.ts +29 -39
- package/tests/fs/watch.test.ts +2 -2
- package/tests/setup/context.ts +9 -0
- package/tests/setup/cow+fetch.ts +1 -1
- package/tests/setup/memory.ts +1 -1
- package/tests/{setup/common.ts → setup.ts} +6 -5
- package/src/backends/backend.ts +0 -161
- package/src/backends/fetch.ts +0 -180
- package/src/backends/file_index.ts +0 -206
- package/src/backends/memory.ts +0 -45
- package/src/backends/overlay.ts +0 -560
- package/src/backends/port/fs.ts +0 -329
- package/src/backends/port/readme.md +0 -54
- package/src/backends/port/rpc.ts +0 -167
- package/src/backends/readme.md +0 -3
- package/src/backends/store/fs.ts +0 -667
- package/src/backends/store/readme.md +0 -9
- package/src/backends/store/simple.ts +0 -154
- package/src/backends/store/store.ts +0 -189
- package/src/config.ts +0 -227
- package/src/credentials.ts +0 -49
- package/src/devices.ts +0 -521
- package/src/emulation/async.ts +0 -834
- package/src/emulation/cache.ts +0 -86
- package/src/emulation/config.ts +0 -21
- package/src/emulation/constants.ts +0 -182
- package/src/emulation/dir.ts +0 -138
- package/src/emulation/index.ts +0 -8
- package/src/emulation/path.ts +0 -440
- package/src/emulation/promises.ts +0 -1140
- package/src/emulation/shared.ts +0 -172
- package/src/emulation/streams.ts +0 -34
- package/src/emulation/sync.ts +0 -863
- package/src/emulation/watchers.ts +0 -194
- package/src/error.ts +0 -307
- package/src/file.ts +0 -631
- package/src/filesystem.ts +0 -174
- package/src/index.ts +0 -35
- package/src/inode.ts +0 -128
- package/src/mixins/async.ts +0 -230
- package/src/mixins/index.ts +0 -5
- package/src/mixins/mutexed.ts +0 -257
- package/src/mixins/readonly.ts +0 -96
- package/src/mixins/shared.ts +0 -25
- package/src/mixins/sync.ts +0 -58
- package/src/polyfills.ts +0 -21
- package/src/stats.ts +0 -405
- package/src/utils.ts +0 -276
- package/tests/mounts.test.ts +0 -18
- package/tests/path.test.ts +0 -34
|
@@ -4,6 +4,7 @@ import type * as promises from 'node:fs/promises';
|
|
|
4
4
|
import type { Stream } from 'node:stream';
|
|
5
5
|
import type { ReadableStream as TReadableStream } from 'node:stream/web';
|
|
6
6
|
import type { Interface as ReadlineInterface } from 'readline';
|
|
7
|
+
import type { V_Context } from '../context.js';
|
|
7
8
|
import type { File } from '../file.js';
|
|
8
9
|
import type { FileContents } from '../filesystem.js';
|
|
9
10
|
import '../polyfills.js';
|
|
@@ -13,6 +14,7 @@ import { type InternalOptions, type ReaddirOptions } from './shared.js';
|
|
|
13
14
|
import { ReadStream, WriteStream } from './streams.js';
|
|
14
15
|
export * as constants from './constants.js';
|
|
15
16
|
export declare class FileHandle implements promises.FileHandle {
|
|
17
|
+
protected context?: V_Context | undefined;
|
|
16
18
|
/**
|
|
17
19
|
* The file descriptor for this file handle.
|
|
18
20
|
*/
|
|
@@ -22,7 +24,7 @@ export declare class FileHandle implements promises.FileHandle {
|
|
|
22
24
|
* The file for this file handle
|
|
23
25
|
*/
|
|
24
26
|
readonly file: File;
|
|
25
|
-
constructor(fdOrFile: number | File);
|
|
27
|
+
constructor(fdOrFile: number | File, context?: V_Context | undefined);
|
|
26
28
|
/**
|
|
27
29
|
* Asynchronous fchown(2) - Change ownership of a file.
|
|
28
30
|
*/
|
|
@@ -163,51 +165,51 @@ export declare class FileHandle implements promises.FileHandle {
|
|
|
163
165
|
*/
|
|
164
166
|
createWriteStream(options?: promises.CreateWriteStreamOptions): WriteStream;
|
|
165
167
|
}
|
|
166
|
-
export declare function rename(oldPath: fs.PathLike, newPath: fs.PathLike): Promise<void>;
|
|
168
|
+
export declare function rename(this: V_Context, oldPath: fs.PathLike, newPath: fs.PathLike): Promise<void>;
|
|
167
169
|
/**
|
|
168
170
|
* Test whether or not `path` exists by checking with the file system.
|
|
169
171
|
*/
|
|
170
|
-
export declare function exists(path: fs.PathLike): Promise<boolean>;
|
|
171
|
-
export declare function stat(path: fs.PathLike, options: fs.BigIntOptions): Promise<BigIntStats>;
|
|
172
|
-
export declare function stat(path: fs.PathLike, options?: {
|
|
172
|
+
export declare function exists(this: V_Context, path: fs.PathLike): Promise<boolean>;
|
|
173
|
+
export declare function stat(this: V_Context, path: fs.PathLike, options: fs.BigIntOptions): Promise<BigIntStats>;
|
|
174
|
+
export declare function stat(this: V_Context, path: fs.PathLike, options?: {
|
|
173
175
|
bigint?: false;
|
|
174
176
|
}): Promise<Stats>;
|
|
175
|
-
export declare function stat(path: fs.PathLike, options?: fs.StatOptions): Promise<Stats | BigIntStats>;
|
|
177
|
+
export declare function stat(this: V_Context, path: fs.PathLike, options?: fs.StatOptions): Promise<Stats | BigIntStats>;
|
|
176
178
|
/**
|
|
177
179
|
* `lstat`.
|
|
178
180
|
* `lstat()` is identical to `stat()`, except that if path is a symbolic link,
|
|
179
181
|
* then the link itself is stat-ed, not the file that it refers to.
|
|
180
182
|
*/
|
|
181
|
-
export declare function lstat(path: fs.PathLike, options?: {
|
|
183
|
+
export declare function lstat(this: V_Context, path: fs.PathLike, options?: {
|
|
182
184
|
bigint?: boolean;
|
|
183
185
|
}): Promise<Stats>;
|
|
184
|
-
export declare function lstat(path: fs.PathLike, options: {
|
|
186
|
+
export declare function lstat(this: V_Context, path: fs.PathLike, options: {
|
|
185
187
|
bigint: true;
|
|
186
188
|
}): Promise<BigIntStats>;
|
|
187
|
-
export declare function truncate(path: fs.PathLike, len?: number): Promise<void>;
|
|
188
|
-
export declare function unlink(path: fs.PathLike): Promise<void>;
|
|
189
|
+
export declare function truncate(this: V_Context, path: fs.PathLike, len?: number): Promise<void>;
|
|
190
|
+
export declare function unlink(this: V_Context, path: fs.PathLike): Promise<void>;
|
|
189
191
|
/**
|
|
190
192
|
* Asynchronous file open.
|
|
191
193
|
* @see http://www.manpagez.com/man/2/open/
|
|
192
194
|
* @param flag Handles the complexity of the various file modes. See its API for more details.
|
|
193
195
|
* @param mode Mode to use to open the file. Can be ignored if the filesystem doesn't support permissions.
|
|
194
196
|
*/
|
|
195
|
-
export declare function open(path: fs.PathLike, flag?: fs.OpenMode, mode?: fs.Mode): Promise<FileHandle>;
|
|
197
|
+
export declare function open(this: V_Context, path: fs.PathLike, flag?: fs.OpenMode, mode?: fs.Mode): Promise<FileHandle>;
|
|
196
198
|
/**
|
|
197
199
|
* Asynchronously reads the entire contents of a file.
|
|
198
200
|
* @option encoding The string encoding for the file contents. Defaults to `null`.
|
|
199
201
|
* @option flag Defaults to `'r'`.
|
|
200
202
|
* @returns the file data
|
|
201
203
|
*/
|
|
202
|
-
export declare function readFile(path: fs.PathLike | promises.FileHandle, options?: {
|
|
204
|
+
export declare function readFile(this: V_Context, path: fs.PathLike | promises.FileHandle, options?: {
|
|
203
205
|
encoding?: null;
|
|
204
206
|
flag?: fs.OpenMode;
|
|
205
207
|
} | null): Promise<Buffer>;
|
|
206
|
-
export declare function readFile(path: fs.PathLike | promises.FileHandle, options: {
|
|
208
|
+
export declare function readFile(this: V_Context, path: fs.PathLike | promises.FileHandle, options: {
|
|
207
209
|
encoding: BufferEncoding;
|
|
208
210
|
flag?: fs.OpenMode;
|
|
209
211
|
} | BufferEncoding): Promise<string>;
|
|
210
|
-
export declare function readFile(path: fs.PathLike | promises.FileHandle, options?: (fs.ObjectEncodingOptions & {
|
|
212
|
+
export declare function readFile(this: V_Context, path: fs.PathLike | promises.FileHandle, options?: (fs.ObjectEncodingOptions & {
|
|
211
213
|
flag?: fs.OpenMode;
|
|
212
214
|
}) | BufferEncoding | null): Promise<string | Buffer>;
|
|
213
215
|
/**
|
|
@@ -218,7 +220,7 @@ export declare function readFile(path: fs.PathLike | promises.FileHandle, option
|
|
|
218
220
|
* @option mode Defaults to `0644`.
|
|
219
221
|
* @option flag Defaults to `'w'`.
|
|
220
222
|
*/
|
|
221
|
-
export declare function writeFile(path: fs.PathLike | promises.FileHandle, data: FileContents | Stream | Iterable<string | ArrayBufferView> | AsyncIterable<string | ArrayBufferView>, _options?: (fs.ObjectEncodingOptions & {
|
|
223
|
+
export declare function writeFile(this: V_Context, path: fs.PathLike | promises.FileHandle, data: FileContents | Stream | Iterable<string | ArrayBufferView> | AsyncIterable<string | ArrayBufferView>, _options?: (fs.ObjectEncodingOptions & {
|
|
222
224
|
mode?: fs.Mode;
|
|
223
225
|
flag?: fs.OpenMode;
|
|
224
226
|
flush?: boolean;
|
|
@@ -229,24 +231,24 @@ export declare function writeFile(path: fs.PathLike | promises.FileHandle, data:
|
|
|
229
231
|
* @option mode Defaults to `0644`.
|
|
230
232
|
* @option flag Defaults to `'a'`.
|
|
231
233
|
*/
|
|
232
|
-
export declare function appendFile(path: fs.PathLike | promises.FileHandle, data: FileContents, _options?: BufferEncoding | (fs.EncodingOption & {
|
|
234
|
+
export declare function appendFile(this: V_Context, path: fs.PathLike | promises.FileHandle, data: FileContents, _options?: BufferEncoding | (fs.EncodingOption & {
|
|
233
235
|
mode?: fs.Mode;
|
|
234
236
|
flag?: fs.OpenMode;
|
|
235
237
|
}) | null): Promise<void>;
|
|
236
|
-
export declare function rmdir(path: fs.PathLike): Promise<void>;
|
|
238
|
+
export declare function rmdir(this: V_Context, path: fs.PathLike): Promise<void>;
|
|
237
239
|
/**
|
|
238
240
|
* Asynchronous mkdir(2) - create a directory.
|
|
239
241
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
240
242
|
* @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
|
|
241
243
|
* should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
|
|
242
244
|
*/
|
|
243
|
-
export declare function mkdir(path: fs.PathLike, options: fs.MakeDirectoryOptions & {
|
|
245
|
+
export declare function mkdir(this: V_Context, path: fs.PathLike, options: fs.MakeDirectoryOptions & {
|
|
244
246
|
recursive: true;
|
|
245
247
|
}): Promise<string | undefined>;
|
|
246
|
-
export declare function mkdir(path: fs.PathLike, options?: fs.Mode | (fs.MakeDirectoryOptions & {
|
|
248
|
+
export declare function mkdir(this: V_Context, path: fs.PathLike, options?: fs.Mode | (fs.MakeDirectoryOptions & {
|
|
247
249
|
recursive?: false | undefined;
|
|
248
250
|
}) | null): Promise<void>;
|
|
249
|
-
export declare function mkdir(path: fs.PathLike, options?: fs.Mode | fs.MakeDirectoryOptions | null): Promise<string | undefined>;
|
|
251
|
+
export declare function mkdir(this: V_Context, path: fs.PathLike, options?: fs.Mode | fs.MakeDirectoryOptions | null): Promise<string | undefined>;
|
|
250
252
|
/**
|
|
251
253
|
* Asynchronous readdir(3) - read a directory.
|
|
252
254
|
*
|
|
@@ -254,67 +256,67 @@ export declare function mkdir(path: fs.PathLike, options?: fs.Mode | fs.MakeDire
|
|
|
254
256
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
255
257
|
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'`.
|
|
256
258
|
*/
|
|
257
|
-
export declare function readdir(path: fs.PathLike, options?: (fs.ObjectEncodingOptions & ReaddirOptions & {
|
|
259
|
+
export declare function readdir(this: V_Context, path: fs.PathLike, options?: (fs.ObjectEncodingOptions & ReaddirOptions & {
|
|
258
260
|
withFileTypes?: false;
|
|
259
261
|
}) | BufferEncoding | null): Promise<string[]>;
|
|
260
|
-
export declare function readdir(path: fs.PathLike, options: fs.BufferEncodingOption & ReaddirOptions & {
|
|
262
|
+
export declare function readdir(this: V_Context, path: fs.PathLike, options: fs.BufferEncodingOption & ReaddirOptions & {
|
|
261
263
|
withFileTypes?: false;
|
|
262
264
|
}): Promise<Buffer[]>;
|
|
263
|
-
export declare function readdir(path: fs.PathLike, options?: (fs.ObjectEncodingOptions & ReaddirOptions & {
|
|
265
|
+
export declare function readdir(this: V_Context, path: fs.PathLike, options?: (fs.ObjectEncodingOptions & ReaddirOptions & {
|
|
264
266
|
withFileTypes?: false;
|
|
265
267
|
}) | BufferEncoding | null): Promise<string[] | Buffer[]>;
|
|
266
|
-
export declare function readdir(path: fs.PathLike, options: fs.ObjectEncodingOptions & ReaddirOptions & {
|
|
268
|
+
export declare function readdir(this: V_Context, path: fs.PathLike, options: fs.ObjectEncodingOptions & ReaddirOptions & {
|
|
267
269
|
withFileTypes: true;
|
|
268
270
|
}): Promise<Dirent[]>;
|
|
269
|
-
export declare function readdir(path: fs.PathLike, options?: (ReaddirOptions & (fs.ObjectEncodingOptions | fs.BufferEncodingOption)) | BufferEncoding | null): Promise<string[] | Dirent[] | Buffer[]>;
|
|
270
|
-
export declare function link(targetPath: fs.PathLike, linkPath: fs.PathLike): Promise<void>;
|
|
271
|
+
export declare function readdir(this: V_Context, path: fs.PathLike, options?: (ReaddirOptions & (fs.ObjectEncodingOptions | fs.BufferEncodingOption)) | BufferEncoding | null): Promise<string[] | Dirent[] | Buffer[]>;
|
|
272
|
+
export declare function link(this: V_Context, targetPath: fs.PathLike, linkPath: fs.PathLike): Promise<void>;
|
|
271
273
|
/**
|
|
272
274
|
* `symlink`.
|
|
273
275
|
* @param target target path
|
|
274
276
|
* @param path link path
|
|
275
277
|
* @param type can be either `'dir'` or `'file'` (default is `'file'`)
|
|
276
278
|
*/
|
|
277
|
-
export declare function symlink(target: fs.PathLike, path: fs.PathLike, type?: fs.symlink.Type | string | null): Promise<void>;
|
|
278
|
-
export declare function readlink(path: fs.PathLike, options: fs.BufferEncodingOption): Promise<Buffer>;
|
|
279
|
-
export declare function readlink(path: fs.PathLike, options?: fs.EncodingOption | null): Promise<string>;
|
|
280
|
-
export declare function readlink(path: fs.PathLike, options?: fs.BufferEncodingOption | fs.EncodingOption | string | null): Promise<string | Buffer>;
|
|
281
|
-
export declare function chown(path: fs.PathLike, uid: number, gid: number): Promise<void>;
|
|
282
|
-
export declare function lchown(path: fs.PathLike, uid: number, gid: number): Promise<void>;
|
|
283
|
-
export declare function chmod(path: fs.PathLike, mode: fs.Mode): Promise<void>;
|
|
284
|
-
export declare function lchmod(path: fs.PathLike, mode: fs.Mode): Promise<void>;
|
|
279
|
+
export declare function symlink(this: V_Context, target: fs.PathLike, path: fs.PathLike, type?: fs.symlink.Type | string | null): Promise<void>;
|
|
280
|
+
export declare function readlink(this: V_Context, path: fs.PathLike, options: fs.BufferEncodingOption): Promise<Buffer>;
|
|
281
|
+
export declare function readlink(this: V_Context, path: fs.PathLike, options?: fs.EncodingOption | null): Promise<string>;
|
|
282
|
+
export declare function readlink(this: V_Context, path: fs.PathLike, options?: fs.BufferEncodingOption | fs.EncodingOption | string | null): Promise<string | Buffer>;
|
|
283
|
+
export declare function chown(this: V_Context, path: fs.PathLike, uid: number, gid: number): Promise<void>;
|
|
284
|
+
export declare function lchown(this: V_Context, path: fs.PathLike, uid: number, gid: number): Promise<void>;
|
|
285
|
+
export declare function chmod(this: V_Context, path: fs.PathLike, mode: fs.Mode): Promise<void>;
|
|
286
|
+
export declare function lchmod(this: V_Context, path: fs.PathLike, mode: fs.Mode): Promise<void>;
|
|
285
287
|
/**
|
|
286
288
|
* Change file timestamps of the file referenced by the supplied path.
|
|
287
289
|
*/
|
|
288
|
-
export declare function utimes(path: fs.PathLike, atime: string | number | Date, mtime: string | number | Date): Promise<void>;
|
|
290
|
+
export declare function utimes(this: V_Context, path: fs.PathLike, atime: string | number | Date, mtime: string | number | Date): Promise<void>;
|
|
289
291
|
/**
|
|
290
292
|
* Change file timestamps of the file referenced by the supplied path.
|
|
291
293
|
*/
|
|
292
|
-
export declare function lutimes(path: fs.PathLike, atime: fs.TimeLike, mtime: fs.TimeLike): Promise<void>;
|
|
294
|
+
export declare function lutimes(this: V_Context, path: fs.PathLike, atime: fs.TimeLike, mtime: fs.TimeLike): Promise<void>;
|
|
293
295
|
/**
|
|
294
296
|
* Asynchronous realpath(3) - return the canonicalized absolute pathname.
|
|
295
297
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
296
298
|
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. Defaults to `'utf8'`.
|
|
297
299
|
* @todo handle options
|
|
298
300
|
*/
|
|
299
|
-
export declare function realpath(path: fs.PathLike, options: fs.BufferEncodingOption): Promise<Buffer>;
|
|
300
|
-
export declare function realpath(path: fs.PathLike, options?: fs.EncodingOption | BufferEncoding): Promise<string>;
|
|
301
|
+
export declare function realpath(this: V_Context, path: fs.PathLike, options: fs.BufferEncodingOption): Promise<Buffer>;
|
|
302
|
+
export declare function realpath(this: V_Context, path: fs.PathLike, options?: fs.EncodingOption | BufferEncoding): Promise<string>;
|
|
301
303
|
export declare function watch(filename: fs.PathLike, options?: fs.WatchOptions | BufferEncoding): AsyncIterable<promises.FileChangeInfo<string>>;
|
|
302
304
|
export declare function watch(filename: fs.PathLike, options: fs.WatchOptions | fs.BufferEncodingOption): AsyncIterable<promises.FileChangeInfo<Buffer>>;
|
|
303
305
|
export declare function watch(filename: fs.PathLike, options?: fs.WatchOptions | string): AsyncIterable<promises.FileChangeInfo<string>> | AsyncIterable<promises.FileChangeInfo<Buffer>>;
|
|
304
|
-
export declare function access(path: fs.PathLike, mode?: number): Promise<void>;
|
|
306
|
+
export declare function access(this: V_Context, path: fs.PathLike, mode?: number): Promise<void>;
|
|
305
307
|
/**
|
|
306
308
|
* Asynchronous `rm`. Removes files or directories (recursively).
|
|
307
309
|
* @param path The path to the file or directory to remove.
|
|
308
310
|
*/
|
|
309
|
-
export declare function rm(path: fs.PathLike, options?: fs.RmOptions & InternalOptions): Promise<void>;
|
|
311
|
+
export declare function rm(this: V_Context, path: fs.PathLike, options?: fs.RmOptions & InternalOptions): Promise<void>;
|
|
310
312
|
/**
|
|
311
313
|
* Asynchronous `mkdtemp`. Creates a unique temporary directory.
|
|
312
314
|
* @param prefix The directory prefix.
|
|
313
315
|
* @param options The encoding (or an object including `encoding`).
|
|
314
316
|
* @returns The path to the created temporary directory, encoded as a string or buffer.
|
|
315
317
|
*/
|
|
316
|
-
export declare function mkdtemp(prefix: string, options?: fs.EncodingOption): Promise<string>;
|
|
317
|
-
export declare function mkdtemp(prefix: string, options?: fs.BufferEncodingOption): Promise<Buffer>;
|
|
318
|
+
export declare function mkdtemp(this: V_Context, prefix: string, options?: fs.EncodingOption): Promise<string>;
|
|
319
|
+
export declare function mkdtemp(this: V_Context, prefix: string, options?: fs.BufferEncodingOption): Promise<Buffer>;
|
|
318
320
|
/**
|
|
319
321
|
* Asynchronous `copyFile`. Copies a file.
|
|
320
322
|
* @param src The source file.
|
|
@@ -322,7 +324,7 @@ export declare function mkdtemp(prefix: string, options?: fs.BufferEncodingOptio
|
|
|
322
324
|
* @param mode Optional flags for the copy operation. Currently supports these flags:
|
|
323
325
|
* * `fs.constants.COPYFILE_EXCL`: If the destination file already exists, the operation fails.
|
|
324
326
|
*/
|
|
325
|
-
export declare function copyFile(src: fs.PathLike, dest: fs.PathLike, mode?: number): Promise<void>;
|
|
327
|
+
export declare function copyFile(this: V_Context, src: fs.PathLike, dest: fs.PathLike, mode?: number): Promise<void>;
|
|
326
328
|
/**
|
|
327
329
|
* Asynchronous `opendir`. Opens a directory.
|
|
328
330
|
* @param path The path to the directory.
|
|
@@ -330,7 +332,7 @@ export declare function copyFile(src: fs.PathLike, dest: fs.PathLike, mode?: num
|
|
|
330
332
|
* @returns A `Dir` object representing the opened directory.
|
|
331
333
|
* @todo Use options
|
|
332
334
|
*/
|
|
333
|
-
export declare function opendir(path: fs.PathLike, options?: fs.OpenDirOptions): Promise<Dir>;
|
|
335
|
+
export declare function opendir(this: V_Context, path: fs.PathLike, options?: fs.OpenDirOptions): Promise<Dir>;
|
|
334
336
|
/**
|
|
335
337
|
* Asynchronous `cp`. Recursively copies a file or directory.
|
|
336
338
|
* @param source The source file or directory.
|
|
@@ -343,15 +345,15 @@ export declare function opendir(path: fs.PathLike, options?: fs.OpenDirOptions):
|
|
|
343
345
|
* * `preserveTimestamps`: Preserve file timestamps.
|
|
344
346
|
* * `recursive`: If `true`, copies directories recursively.
|
|
345
347
|
*/
|
|
346
|
-
export declare function cp(source: fs.PathLike, destination: fs.PathLike, opts?: fs.CopyOptions): Promise<void>;
|
|
348
|
+
export declare function cp(this: V_Context, source: fs.PathLike, destination: fs.PathLike, opts?: fs.CopyOptions): Promise<void>;
|
|
347
349
|
/**
|
|
348
350
|
* @since Node v18.15.0
|
|
349
351
|
* @returns Fulfills with an {fs.StatFs} for the file system.
|
|
350
352
|
*/
|
|
351
|
-
export declare function statfs(path: fs.PathLike, opts?: fs.StatFsOptions & {
|
|
353
|
+
export declare function statfs(this: V_Context, path: fs.PathLike, opts?: fs.StatFsOptions & {
|
|
352
354
|
bigint?: false;
|
|
353
355
|
}): Promise<fs.StatsFs>;
|
|
354
|
-
export declare function statfs(path: fs.PathLike, opts: fs.StatFsOptions & {
|
|
356
|
+
export declare function statfs(this: V_Context, path: fs.PathLike, opts: fs.StatFsOptions & {
|
|
355
357
|
bigint: true;
|
|
356
358
|
}): Promise<fs.BigIntStatsFs>;
|
|
357
|
-
export declare function statfs(path: fs.PathLike, opts?: fs.StatFsOptions): Promise<fs.StatsFs | fs.BigIntStatsFs>;
|
|
359
|
+
export declare function statfs(this: V_Context, path: fs.PathLike, opts?: fs.StatFsOptions): Promise<fs.StatsFs | fs.BigIntStatsFs>;
|