Open wclr opened 9 months ago
definitely, it's in node:fs
https://nodejs.org/docs/latest/api/fs.html#fswatchfilename-options-listener
https://chatgpt.com/share/66ff459b-140c-8000-bad0-b45dada09474
fs.cp
(for copying directories recursively)fs.createReadStream
~fs.createWriteStream
~fs.exists
(deprecated in favor of fs.access
)fs.fchmod
fs.fchown
fs.fdatasync
fs.fstat
fs.fsync
fs.ftruncate
fs.futimes
fs.glob
fs.lchmod
fs.lchown
fs.lutimes
fs.openAsBlob
fs.opendir
fs.readv
fs.realpath.native
~fs.statfs
fs.unwatchFile
fs.watch
fs.watchFile
fs.writev
The delta, or missing methods not currently exported by your code, includes many of the specialized methods, ~especially related to streams (createReadStream
, createWriteStream
)~, file descriptors (fchmod
, fchown
), synchronization (fdatasync
, fsync
), and utility functions like glob
, watch
, statfs
, etc.
fs.cpSync
cpSync
(for copying directories/files recursively).fs.fchmodSync
fchmodSync
(change file mode with file descriptor).fs.fchownSync
fchownSync
(change file ownership with file descriptor).fs.fdatasyncSync
fdatasyncSync
(synchronize a file's in-core state with storage device).fs.fstatSync
fstatSync
(retrieve file status using file descriptor).fs.ftruncateSync
ftruncateSync
(truncate file to specified length with file descriptor).fs.futimesSync
futimesSync
(change file timestamps with file descriptor).fs.globSync
globSync
(find files matching a pattern).fs.lchmodSync
lchmodSync
(change file mode for symbolic link).fs.lchownSync
lchownSync
(change ownership of a symbolic link).fs.lutimesSync
lutimesSync
(change symbolic link timestamps).fs.opendirSync
opendirSync
(open directory for reading its contents).fs.readvSync
readvSync
(read multiple buffers from a file descriptor).~fs.realpathSync.native
~
realpathSync.native
(use native realpath implementation).fs.statfsSync
statfsSync
(retrieve filesystem statistics).fs.writevSync
writevSync
(write multiple buffers to a file descriptor).Add these missing methods:
cpSync
, fchmodSync
, fchownSync
, fdatasyncSync
, fstatSync
, ftruncateSync
, futimesSync
, globSync
, lchmodSync
, lchownSync
, lutimesSync
, opendirSync
, readvSync
, realpathSync.native
, statfsSync
, writevSync
.No methods to remove as there are no deprecated methods among the ones you are exporting.
It is not large API surface:
watch, watchFile, unwatchFile, FSWatcher, StatWatcher
.What do you think, should it go to a separate module
Node.FS.Watch
?