memfs 4.0.0 → 4.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 (105) hide show
  1. package/LICENSE +201 -24
  2. package/README.md +21 -92
  3. package/lib/Dirent.d.ts +2 -1
  4. package/lib/__tests__/util.d.ts +13 -0
  5. package/lib/__tests__/util.js +29 -0
  6. package/lib/consts/AMODE.d.ts +9 -0
  7. package/lib/consts/FLAG.d.ts +22 -0
  8. package/lib/consts/FLAG.js +2 -0
  9. package/lib/fsa/types.d.ts +3 -3
  10. package/lib/fsa-to-node/FsaNodeCore.d.ts +32 -0
  11. package/lib/fsa-to-node/FsaNodeCore.js +168 -0
  12. package/lib/fsa-to-node/FsaNodeDirent.d.ts +13 -0
  13. package/lib/fsa-to-node/FsaNodeDirent.js +31 -0
  14. package/lib/fsa-to-node/FsaNodeFs.d.ts +171 -0
  15. package/lib/fsa-to-node/FsaNodeFs.js +842 -0
  16. package/lib/fsa-to-node/FsaNodeFsOpenFile.d.ts +24 -0
  17. package/lib/fsa-to-node/FsaNodeFsOpenFile.js +46 -0
  18. package/lib/fsa-to-node/FsaNodeReadStream.d.ts +24 -0
  19. package/lib/fsa-to-node/FsaNodeReadStream.js +100 -0
  20. package/lib/fsa-to-node/FsaNodeStats.d.ts +30 -0
  21. package/lib/fsa-to-node/FsaNodeStats.js +52 -0
  22. package/lib/fsa-to-node/FsaNodeWriteStream.d.ts +48 -0
  23. package/lib/fsa-to-node/FsaNodeWriteStream.js +162 -0
  24. package/lib/fsa-to-node/__tests__/FsaNodeFs.test.d.ts +1 -0
  25. package/lib/fsa-to-node/__tests__/FsaNodeFs.test.js +873 -0
  26. package/lib/fsa-to-node/__tests__/util.test.d.ts +1 -0
  27. package/lib/fsa-to-node/__tests__/util.test.js +28 -0
  28. package/lib/fsa-to-node/constants.d.ts +3 -0
  29. package/lib/fsa-to-node/constants.js +2 -0
  30. package/lib/fsa-to-node/index.d.ts +2 -0
  31. package/lib/fsa-to-node/index.js +7 -0
  32. package/lib/fsa-to-node/json.d.ts +4 -0
  33. package/lib/fsa-to-node/json.js +7 -0
  34. package/lib/fsa-to-node/types.d.ts +37 -0
  35. package/lib/fsa-to-node/types.js +2 -0
  36. package/lib/fsa-to-node/util.d.ts +4 -0
  37. package/lib/fsa-to-node/util.js +40 -0
  38. package/lib/fsa-to-node/worker/FsaNodeSyncAdapterWorker.d.ts +10 -0
  39. package/lib/fsa-to-node/worker/FsaNodeSyncAdapterWorker.js +72 -0
  40. package/lib/fsa-to-node/worker/FsaNodeSyncWorker.d.ts +20 -0
  41. package/lib/fsa-to-node/worker/FsaNodeSyncWorker.js +190 -0
  42. package/lib/fsa-to-node/worker/SyncMessenger.d.ts +24 -0
  43. package/lib/fsa-to-node/worker/SyncMessenger.js +80 -0
  44. package/lib/fsa-to-node/worker/constants.d.ts +8 -0
  45. package/lib/fsa-to-node/worker/constants.js +2 -0
  46. package/lib/fsa-to-node/worker/types.d.ts +17 -0
  47. package/lib/fsa-to-node/worker/types.js +2 -0
  48. package/lib/index.d.ts +5 -4
  49. package/lib/index.js +1 -1
  50. package/lib/node/constants.d.ts +41 -0
  51. package/lib/node/constants.js +56 -0
  52. package/lib/node/options.d.ts +23 -0
  53. package/lib/node/options.js +94 -0
  54. package/lib/node/promises.d.ts +1 -1
  55. package/lib/node/promises.js +1 -3
  56. package/lib/node/types/FsCommonObjects.d.ts +17 -0
  57. package/lib/node/types/FsCommonObjects.js +2 -0
  58. package/lib/node/types/{sync.d.ts → FsSynchronousApi.d.ts} +36 -37
  59. package/lib/node/types/FsSynchronousApi.js +2 -0
  60. package/lib/node/types/callback.d.ts +57 -58
  61. package/lib/node/types/index.d.ts +1 -1
  62. package/lib/node/types/misc.d.ts +6 -8
  63. package/lib/node/types/options.d.ts +20 -6
  64. package/lib/node/types/promises.d.ts +2 -2
  65. package/lib/node/util.d.ts +19 -0
  66. package/lib/node/util.js +265 -1
  67. package/lib/node-to-fsa/NodeFileSystemDirectoryHandle.d.ts +71 -0
  68. package/lib/node-to-fsa/NodeFileSystemDirectoryHandle.js +264 -0
  69. package/lib/node-to-fsa/NodeFileSystemFileHandle.d.ts +28 -0
  70. package/lib/node-to-fsa/NodeFileSystemFileHandle.js +73 -0
  71. package/lib/node-to-fsa/NodeFileSystemHandle.d.ts +33 -0
  72. package/lib/node-to-fsa/NodeFileSystemHandle.js +53 -0
  73. package/lib/node-to-fsa/NodeFileSystemSyncAccessHandle.d.ts +42 -0
  74. package/lib/node-to-fsa/NodeFileSystemSyncAccessHandle.js +116 -0
  75. package/lib/node-to-fsa/NodeFileSystemWritableFileStream.d.ts +54 -0
  76. package/lib/node-to-fsa/NodeFileSystemWritableFileStream.js +195 -0
  77. package/lib/node-to-fsa/NodePermissionStatus.d.ts +8 -0
  78. package/lib/node-to-fsa/NodePermissionStatus.js +13 -0
  79. package/lib/node-to-fsa/__tests__/NodeFileSystemDirectoryHandle.test.d.ts +1 -0
  80. package/lib/node-to-fsa/__tests__/NodeFileSystemDirectoryHandle.test.js +627 -0
  81. package/lib/node-to-fsa/__tests__/NodeFileSystemFileHandle.test.d.ts +1 -0
  82. package/lib/node-to-fsa/__tests__/NodeFileSystemFileHandle.test.js +191 -0
  83. package/lib/node-to-fsa/__tests__/NodeFileSystemHandle.test.d.ts +1 -0
  84. package/lib/node-to-fsa/__tests__/NodeFileSystemHandle.test.js +49 -0
  85. package/lib/node-to-fsa/__tests__/NodeFileSystemSyncAccessHandle.test.d.ts +1 -0
  86. package/lib/node-to-fsa/__tests__/NodeFileSystemSyncAccessHandle.test.js +183 -0
  87. package/lib/node-to-fsa/__tests__/NodeFileSystemWritableFileStream.test.d.ts +1 -0
  88. package/lib/node-to-fsa/__tests__/NodeFileSystemWritableFileStream.test.js +106 -0
  89. package/lib/node-to-fsa/__tests__/scenarios.test.d.ts +1 -0
  90. package/lib/node-to-fsa/__tests__/scenarios.test.js +46 -0
  91. package/lib/node-to-fsa/__tests__/util.test.d.ts +1 -0
  92. package/lib/node-to-fsa/__tests__/util.test.js +25 -0
  93. package/lib/node-to-fsa/index.d.ts +7 -0
  94. package/lib/node-to-fsa/index.js +26 -0
  95. package/lib/node-to-fsa/types.d.ts +12 -0
  96. package/lib/node-to-fsa/types.js +2 -0
  97. package/lib/node-to-fsa/util.d.ts +11 -0
  98. package/lib/node-to-fsa/util.js +33 -0
  99. package/lib/node.d.ts +1 -1
  100. package/lib/volume.d.ts +45 -126
  101. package/lib/volume.js +204 -562
  102. package/lib/webfs/index.d.ts +1 -0
  103. package/lib/webfs/index.js +22 -0
  104. package/package.json +28 -5
  105. /package/lib/{node/types/sync.js → consts/AMODE.js} +0 -0
@@ -0,0 +1,168 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.FsaNodeCore = void 0;
13
+ const util_1 = require("../node/util");
14
+ const util_2 = require("./util");
15
+ const constants_1 = require("../node/constants");
16
+ const FsaNodeFsOpenFile_1 = require("./FsaNodeFsOpenFile");
17
+ class FsaNodeCore {
18
+ constructor(root, syncAdapter) {
19
+ this.root = root;
20
+ this.syncAdapter = syncAdapter;
21
+ this.fds = new Map();
22
+ /**
23
+ * A list of reusable (opened and closed) file descriptors, that should be
24
+ * used first before creating a new file descriptor.
25
+ */
26
+ this.releasedFds = [];
27
+ if (root instanceof Promise) {
28
+ root
29
+ .then(root => {
30
+ this.root = root;
31
+ })
32
+ .catch(error => { });
33
+ }
34
+ }
35
+ getSyncAdapter() {
36
+ const adapter = this.syncAdapter;
37
+ if (!adapter)
38
+ throw new Error('No sync adapter');
39
+ return adapter;
40
+ }
41
+ newFdNumber() {
42
+ const releasedFd = this.releasedFds.pop();
43
+ return typeof releasedFd === 'number' ? releasedFd : FsaNodeCore.fd--;
44
+ }
45
+ /**
46
+ * @param path Path from root to the new folder.
47
+ * @param create Whether to create the folders if they don't exist.
48
+ */
49
+ getDir(path, create, funcName) {
50
+ return __awaiter(this, void 0, void 0, function* () {
51
+ let curr = yield this.root;
52
+ const options = { create };
53
+ try {
54
+ for (const name of path) {
55
+ curr = yield curr.getDirectoryHandle(name, options);
56
+ }
57
+ }
58
+ catch (error) {
59
+ if (error && typeof error === 'object') {
60
+ switch (error.name) {
61
+ case 'TypeMismatchError':
62
+ throw (0, util_1.createError)('ENOTDIR', funcName, path.join("/" /* FsaToNodeConstants.Separator */));
63
+ case 'NotFoundError':
64
+ throw (0, util_1.createError)('ENOENT', funcName, path.join("/" /* FsaToNodeConstants.Separator */));
65
+ }
66
+ }
67
+ throw error;
68
+ }
69
+ return curr;
70
+ });
71
+ }
72
+ getFile(path, name, funcName, create) {
73
+ return __awaiter(this, void 0, void 0, function* () {
74
+ const dir = yield this.getDir(path, false, funcName);
75
+ const file = yield dir.getFileHandle(name, { create });
76
+ return file;
77
+ });
78
+ }
79
+ getFileOrDir(path, name, funcName, create) {
80
+ return __awaiter(this, void 0, void 0, function* () {
81
+ const dir = yield this.getDir(path, false, funcName);
82
+ try {
83
+ const file = yield dir.getFileHandle(name);
84
+ return file;
85
+ }
86
+ catch (error) {
87
+ if (error && typeof error === 'object') {
88
+ switch (error.name) {
89
+ case 'TypeMismatchError':
90
+ try {
91
+ return yield dir.getDirectoryHandle(name);
92
+ }
93
+ catch (error2) {
94
+ if (error2 && typeof error2 === 'object') {
95
+ switch (error2.name) {
96
+ case 'TypeMismatchError':
97
+ throw (0, util_1.createError)('ENOTDIR', funcName, path.join("/" /* FsaToNodeConstants.Separator */));
98
+ case 'NotFoundError':
99
+ throw (0, util_1.createError)('ENOENT', funcName, path.join("/" /* FsaToNodeConstants.Separator */));
100
+ }
101
+ }
102
+ }
103
+ case 'NotFoundError':
104
+ throw (0, util_1.createError)('ENOENT', funcName, path.join("/" /* FsaToNodeConstants.Separator */));
105
+ }
106
+ }
107
+ throw error;
108
+ }
109
+ });
110
+ }
111
+ getFileByFd(fd, funcName) {
112
+ if (!(0, util_1.isFd)(fd))
113
+ throw TypeError(constants_1.ERRSTR.FD);
114
+ const file = this.fds.get(fd);
115
+ if (!file)
116
+ throw (0, util_1.createError)('EBADF', funcName);
117
+ return file;
118
+ }
119
+ getFileByFdAsync(fd, funcName) {
120
+ return __awaiter(this, void 0, void 0, function* () {
121
+ return this.getFileByFd(fd, funcName);
122
+ });
123
+ }
124
+ __getFileById(id, funcName, create) {
125
+ return __awaiter(this, void 0, void 0, function* () {
126
+ if (typeof id === 'number')
127
+ return (yield this.getFileByFd(id, funcName)).file;
128
+ const filename = (0, util_1.pathToFilename)(id);
129
+ const [folder, name] = (0, util_2.pathToLocation)(filename);
130
+ return yield this.getFile(folder, name, funcName, create);
131
+ });
132
+ }
133
+ getFileByIdOrCreate(id, funcName) {
134
+ return __awaiter(this, void 0, void 0, function* () {
135
+ if (typeof id === 'number')
136
+ return (yield this.getFileByFd(id, funcName)).file;
137
+ const filename = (0, util_1.pathToFilename)(id);
138
+ const [folder, name] = (0, util_2.pathToLocation)(filename);
139
+ const dir = yield this.getDir(folder, false, funcName);
140
+ return yield dir.getFileHandle(name, { create: true });
141
+ });
142
+ }
143
+ __open(filename, flags, mode) {
144
+ return __awaiter(this, void 0, void 0, function* () {
145
+ const [folder, name] = (0, util_2.pathToLocation)(filename);
146
+ const createIfMissing = !!(flags & 64 /* FLAG.O_CREAT */);
147
+ const fsaFile = yield this.getFile(folder, name, 'open', createIfMissing);
148
+ return this.__open2(fsaFile, filename, flags, mode);
149
+ });
150
+ }
151
+ __open2(fsaFile, filename, flags, mode) {
152
+ const fd = this.newFdNumber();
153
+ const file = new FsaNodeFsOpenFile_1.FsaNodeFsOpenFile(fd, mode, flags, fsaFile, filename);
154
+ this.fds.set(fd, file);
155
+ return file;
156
+ }
157
+ getFileName(id) {
158
+ if (typeof id === 'number') {
159
+ const openFile = this.fds.get(id);
160
+ if (!openFile)
161
+ throw (0, util_1.createError)('EBADF', 'readFile');
162
+ return openFile.filename;
163
+ }
164
+ return (0, util_1.pathToFilename)(id);
165
+ }
166
+ }
167
+ exports.FsaNodeCore = FsaNodeCore;
168
+ FsaNodeCore.fd = 0x7fffffff;
@@ -0,0 +1,13 @@
1
+ import type { IDirent, TDataOut } from '../node/types/misc';
2
+ export declare class FsaNodeDirent implements IDirent {
3
+ readonly name: TDataOut;
4
+ protected readonly kind: 'file' | 'directory';
5
+ constructor(name: TDataOut, kind: 'file' | 'directory');
6
+ isDirectory(): boolean;
7
+ isFile(): boolean;
8
+ isBlockDevice(): boolean;
9
+ isCharacterDevice(): boolean;
10
+ isSymbolicLink(): boolean;
11
+ isFIFO(): boolean;
12
+ isSocket(): boolean;
13
+ }
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FsaNodeDirent = void 0;
4
+ class FsaNodeDirent {
5
+ constructor(name, kind) {
6
+ this.name = name;
7
+ this.kind = kind;
8
+ }
9
+ isDirectory() {
10
+ return this.kind === 'directory';
11
+ }
12
+ isFile() {
13
+ return this.kind === 'file';
14
+ }
15
+ isBlockDevice() {
16
+ return false;
17
+ }
18
+ isCharacterDevice() {
19
+ return false;
20
+ }
21
+ isSymbolicLink() {
22
+ return false;
23
+ }
24
+ isFIFO() {
25
+ return false;
26
+ }
27
+ isSocket() {
28
+ return false;
29
+ }
30
+ }
31
+ exports.FsaNodeDirent = FsaNodeDirent;
@@ -0,0 +1,171 @@
1
+ import { FsaNodeDirent } from './FsaNodeDirent';
2
+ import { FsaNodeStats } from './FsaNodeStats';
3
+ import { FsSynchronousApi } from '../node/types/FsSynchronousApi';
4
+ import { FsaNodeWriteStream } from './FsaNodeWriteStream';
5
+ import { FsaNodeReadStream } from './FsaNodeReadStream';
6
+ import { FsaNodeCore } from './FsaNodeCore';
7
+ import type { FsCallbackApi, FsPromisesApi } from '../node/types';
8
+ import type { FsCommonObjects } from '../node/types/FsCommonObjects';
9
+ /**
10
+ * Constructs a Node.js `fs` API from a File System Access API
11
+ * [`FileSystemDirectoryHandle` object](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemDirectoryHandle).
12
+ */
13
+ export declare class FsaNodeFs extends FsaNodeCore implements FsCallbackApi, FsSynchronousApi, FsCommonObjects {
14
+ readonly promises: FsPromisesApi;
15
+ readonly open: FsCallbackApi['open'];
16
+ readonly close: FsCallbackApi['close'];
17
+ readonly read: FsCallbackApi['read'];
18
+ readonly readFile: FsCallbackApi['readFile'];
19
+ readonly write: FsCallbackApi['write'];
20
+ readonly writev: FsCallbackApi['writev'];
21
+ readonly writeFile: FsCallbackApi['writeFile'];
22
+ readonly copyFile: FsCallbackApi['copyFile'];
23
+ /**
24
+ * @todo There is a proposal for native "self remove" operation.
25
+ * @see https://github.com/whatwg/fs/blob/main/proposals/Remove.md
26
+ */
27
+ readonly unlink: FsCallbackApi['unlink'];
28
+ readonly realpath: FsCallbackApi['realpath'];
29
+ readonly stat: FsCallbackApi['stat'];
30
+ readonly lstat: FsCallbackApi['lstat'];
31
+ readonly fstat: FsCallbackApi['fstat'];
32
+ private getHandleStats;
33
+ /**
34
+ * @todo There is a proposal for native move support.
35
+ * @see https://github.com/whatwg/fs/blob/main/proposals/MovingNonOpfsFiles.md
36
+ */
37
+ readonly rename: FsCallbackApi['rename'];
38
+ readonly exists: FsCallbackApi['exists'];
39
+ readonly access: FsCallbackApi['access'];
40
+ readonly appendFile: FsCallbackApi['appendFile'];
41
+ readonly readdir: FsCallbackApi['readdir'];
42
+ readonly readlink: FsCallbackApi['readlink'];
43
+ /** @todo Could this use `FileSystemSyncAccessHandle.flush` through a Worker thread? */
44
+ readonly fsync: FsCallbackApi['fsync'];
45
+ readonly fdatasync: FsCallbackApi['fdatasync'];
46
+ readonly ftruncate: FsCallbackApi['ftruncate'];
47
+ readonly truncate: FsCallbackApi['truncate'];
48
+ readonly futimes: FsCallbackApi['futimes'];
49
+ readonly utimes: FsCallbackApi['utimes'];
50
+ readonly mkdir: FsCallbackApi['mkdir'];
51
+ readonly mkdtemp: FsCallbackApi['mkdtemp'];
52
+ private rmAll;
53
+ readonly rmdir: FsCallbackApi['rmdir'];
54
+ readonly rm: FsCallbackApi['rm'];
55
+ readonly fchmod: FsCallbackApi['fchmod'];
56
+ readonly chmod: FsCallbackApi['chmod'];
57
+ readonly lchmod: FsCallbackApi['lchmod'];
58
+ readonly fchown: FsCallbackApi['fchown'];
59
+ readonly chown: FsCallbackApi['chown'];
60
+ readonly lchown: FsCallbackApi['lchown'];
61
+ readonly createWriteStream: FsCallbackApi['createWriteStream'];
62
+ readonly createReadStream: FsCallbackApi['createReadStream'];
63
+ readonly symlink: FsCallbackApi['symlink'];
64
+ readonly link: FsCallbackApi['link'];
65
+ /**
66
+ * @todo Watchers could be implemented in the future on top of `FileSystemObserver`,
67
+ * which is currently a proposal.
68
+ * @see https://github.com/whatwg/fs/blob/main/proposals/FileSystemObserver.md
69
+ */
70
+ readonly watchFile: FsCallbackApi['watchFile'];
71
+ readonly unwatchFile: FsCallbackApi['unwatchFile'];
72
+ readonly watch: FsCallbackApi['watch'];
73
+ readonly statSync: FsSynchronousApi['statSync'];
74
+ readonly lstatSync: FsSynchronousApi['lstatSync'];
75
+ readonly fstatSync: FsSynchronousApi['fstatSync'];
76
+ readonly accessSync: FsSynchronousApi['accessSync'];
77
+ readonly readFileSync: FsSynchronousApi['readFileSync'];
78
+ readonly writeFileSync: FsSynchronousApi['writeFileSync'];
79
+ readonly appendFileSync: FsSynchronousApi['appendFileSync'];
80
+ readonly closeSync: FsSynchronousApi['closeSync'];
81
+ readonly existsSync: FsSynchronousApi['existsSync'];
82
+ readonly copyFileSync: FsSynchronousApi['copyFileSync'];
83
+ readonly renameSync: FsSynchronousApi['renameSync'];
84
+ readonly rmdirSync: FsSynchronousApi['rmdirSync'];
85
+ readonly rmSync: FsSynchronousApi['rmSync'];
86
+ readonly mkdirSync: FsSynchronousApi['mkdirSync'];
87
+ readonly mkdtempSync: FsSynchronousApi['mkdtempSync'];
88
+ readonly readlinkSync: FsSynchronousApi['readlinkSync'];
89
+ readonly truncateSync: FsSynchronousApi['truncateSync'];
90
+ readonly ftruncateSync: FsSynchronousApi['ftruncateSync'];
91
+ readonly unlinkSync: FsSynchronousApi['unlinkSync'];
92
+ readonly readdirSync: FsSynchronousApi['readdirSync'];
93
+ readonly realpathSync: FsSynchronousApi['realpathSync'];
94
+ readonly readSync: FsSynchronousApi['readSync'];
95
+ readonly writeSync: FsSynchronousApi['writeSync'];
96
+ readonly openSync: FsSynchronousApi['openSync'];
97
+ readonly fdatasyncSync: FsSynchronousApi['fdatasyncSync'];
98
+ readonly fsyncSync: FsSynchronousApi['fsyncSync'];
99
+ readonly chmodSync: FsSynchronousApi['chmodSync'];
100
+ readonly chownSync: FsSynchronousApi['chownSync'];
101
+ readonly fchmodSync: FsSynchronousApi['fchmodSync'];
102
+ readonly fchownSync: FsSynchronousApi['fchownSync'];
103
+ readonly futimesSync: FsSynchronousApi['futimesSync'];
104
+ readonly lchmodSync: FsSynchronousApi['lchmodSync'];
105
+ readonly lchownSync: FsSynchronousApi['lchownSync'];
106
+ readonly utimesSync: FsSynchronousApi['utimesSync'];
107
+ readonly symlinkSync: FsSynchronousApi['symlinkSync'];
108
+ readonly linkSync: FsSynchronousApi['linkSync'];
109
+ readonly F_OK: number;
110
+ readonly R_OK: number;
111
+ readonly W_OK: number;
112
+ readonly X_OK: number;
113
+ readonly constants: {
114
+ O_RDONLY: number;
115
+ O_WRONLY: number;
116
+ O_RDWR: number;
117
+ S_IFMT: number;
118
+ S_IFREG: number;
119
+ S_IFDIR: number;
120
+ S_IFCHR: number;
121
+ S_IFBLK: number;
122
+ S_IFIFO: number;
123
+ S_IFLNK: number;
124
+ S_IFSOCK: number;
125
+ O_CREAT: number;
126
+ O_EXCL: number;
127
+ O_NOCTTY: number;
128
+ O_TRUNC: number;
129
+ O_APPEND: number;
130
+ O_DIRECTORY: number;
131
+ O_NOATIME: number;
132
+ O_NOFOLLOW: number;
133
+ O_SYNC: number;
134
+ O_DIRECT: number;
135
+ O_NONBLOCK: number;
136
+ S_IRWXU: number;
137
+ S_IRUSR: number;
138
+ S_IWUSR: number;
139
+ S_IXUSR: number;
140
+ S_IRWXG: number;
141
+ S_IRGRP: number;
142
+ S_IWGRP: number;
143
+ S_IXGRP: number;
144
+ S_IRWXO: number;
145
+ S_IROTH: number;
146
+ S_IWOTH: number;
147
+ S_IXOTH: number;
148
+ F_OK: number;
149
+ R_OK: number;
150
+ W_OK: number;
151
+ X_OK: number;
152
+ UV_FS_SYMLINK_DIR: number;
153
+ UV_FS_SYMLINK_JUNCTION: number;
154
+ UV_FS_COPYFILE_EXCL: number;
155
+ UV_FS_COPYFILE_FICLONE: number;
156
+ UV_FS_COPYFILE_FICLONE_FORCE: number;
157
+ COPYFILE_EXCL: number;
158
+ COPYFILE_FICLONE: number;
159
+ COPYFILE_FICLONE_FORCE: number;
160
+ };
161
+ readonly Dirent: typeof FsaNodeDirent;
162
+ readonly Stats: {
163
+ new (isBigInt: boolean, size: any, kind: "file" | "directory"): FsaNodeStats<any>;
164
+ };
165
+ readonly WriteStream: typeof FsaNodeWriteStream;
166
+ readonly ReadStream: typeof FsaNodeReadStream;
167
+ readonly StatFs: any;
168
+ readonly Dir: any;
169
+ readonly StatsWatcher: any;
170
+ readonly FSWatcher: any;
171
+ }