diff --git a/ext/node/polyfills/fs.ts b/ext/node/polyfills/fs.ts index d3b26d6762d178..762c54f555431b 100644 --- a/ext/node/polyfills/fs.ts +++ b/ext/node/polyfills/fs.ts @@ -155,27 +155,6 @@ const { Uint8Array, } = primordials; -const { - F_OK, - R_OK, - W_OK, - X_OK, - O_RDONLY, - O_WRONLY, - O_RDWR, - O_NOCTTY, - O_TRUNC, - O_APPEND, - O_DIRECTORY, - O_NOFOLLOW, - O_SYNC, - O_DSYNC, - O_SYMLINK, - O_NONBLOCK, - O_CREAT, - O_EXCL, -} = constants; - // -- stat -- import { @@ -233,18 +212,6 @@ function stat( ); } -const statPromise = promisify(stat) as ( - & ((path: string | Buffer | URL) => Promise) - & (( - path: string | Buffer | URL, - options: { bigint: false }, - ) => Promise) - & (( - path: string | Buffer | URL, - options: { bigint: true }, - ) => Promise) -); - function statSync(path: string | Buffer | URL): Stats; function statSync( path: string | Buffer | URL, @@ -336,11 +303,6 @@ function realpath( realpath.native = realpath; -const realpathPromise = promisify(realpath) as ( - path: string | Buffer, - options?: RealpathOptions, -) => Promise; - function realpathSync( path: string, options?: RealpathOptions | RealpathEncoding, @@ -641,17 +603,6 @@ function statfsSync( } } -const statfsPromise = promisify(statfs) as ( - & (( - path: string | Buffer | URL, - options?: { bigint?: false }, - ) => Promise>) - & (( - path: string | Buffer | URL, - options: { bigint: true }, - ) => Promise>) -); - function access( path: string | Buffer | URL, mode: number | CallbackWithError, @@ -3036,7 +2987,6 @@ export default { Dirent, exists, existsSync, - F_OK, fchmod, fchmodSync, fchown, @@ -3067,20 +3017,6 @@ export default { mkdirSync, mkdtemp, mkdtempSync, - O_APPEND, - O_CREAT, - O_DIRECTORY, - O_DSYNC, - O_EXCL, - O_NOCTTY, - O_NOFOLLOW, - O_NONBLOCK, - O_RDONLY, - O_RDWR, - O_SYMLINK, - O_SYNC, - O_TRUNC, - O_WRONLY, open, openAsBlob, openSync, @@ -3089,7 +3025,6 @@ export default { read, readSync, promises, - R_OK, readdir, readdirSync, readFile, @@ -3121,10 +3056,8 @@ export default { unwatchFile, utimes, utimesSync, - W_OK, watch, watchFile, - watchPromise, write, writeFile, writev, @@ -3132,7 +3065,6 @@ export default { writeFileSync, WriteStream, writeSync, - X_OK, // For tests _toUnixTimestamp, }; @@ -3167,7 +3099,6 @@ export { Dirent, exists, existsSync, - F_OK, fchmod, fchmodSync, fchown, @@ -3198,27 +3129,12 @@ export { mkdirSync, mkdtemp, mkdtempSync, - O_APPEND, - O_CREAT, - O_DIRECTORY, - O_DSYNC, - O_EXCL, - O_NOCTTY, - O_NOFOLLOW, - O_NONBLOCK, - O_RDONLY, - O_RDWR, - O_SYMLINK, - O_SYNC, - O_TRUNC, - O_WRONLY, open, openAsBlob, opendir, opendirSync, openSync, promises, - R_OK, read, readdir, readdirSync, @@ -3232,7 +3148,6 @@ export { readvPromise, readvSync, realpath, - realpathPromise, realpathSync, rename, renameSync, @@ -3242,9 +3157,7 @@ export { rmSync, stat, statfs, - statfsPromise, statfsSync, - statPromise, Stats, statSync, symlink, @@ -3256,7 +3169,6 @@ export { unwatchFile, utimes, utimesSync, - W_OK, watch, watchFile, watchPromise, @@ -3267,5 +3179,4 @@ export { writeSync, writev, writevSync, - X_OK, };