Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Watch Api bindings #82

Open
wclr opened this issue Jan 1, 2024 · 3 comments
Open

Implement Watch Api bindings #82

wclr opened this issue Jan 1, 2024 · 3 comments

Comments

@wclr
Copy link
Contributor

wclr commented Jan 1, 2024

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?

@wclr wclr changed the title Implement Watch Api Implement Watch Api bindings Jan 1, 2024
@srghma
Copy link

srghma commented Oct 4, 2024

@srghma
Copy link

srghma commented Oct 4, 2024

https://chatgpt.com/share/66ff459b-140c-8000-bad0-b45dada09474

Callback API -> missing methods:

  1. fs.cp (for copying directories recursively)
  2. fs.createReadStream
  3. fs.createWriteStream
  4. fs.exists (deprecated in favor of fs.access)
  5. fs.fchmod
  6. fs.fchown
  7. fs.fdatasync
  8. fs.fstat
  9. fs.fsync
  10. fs.ftruncate
  11. fs.futimes
  12. fs.glob
  13. fs.lchmod
  14. fs.lchown
  15. fs.lutimes
  16. fs.openAsBlob
  17. fs.opendir
  18. fs.readv
  19. fs.realpath.native
  20. fs.statfs
  21. fs.unwatchFile
  22. fs.watch
  23. fs.watchFile
  24. fs.writev

Summary:

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.

Synchronous API -> missing methods:

Missing Methods to Add to Your Library:

  1. fs.cpSync

    • Missing: cpSync (for copying directories/files recursively).
  2. fs.fchmodSync

    • Missing: fchmodSync (change file mode with file descriptor).
  3. fs.fchownSync

    • Missing: fchownSync (change file ownership with file descriptor).
  4. fs.fdatasyncSync

    • Missing: fdatasyncSync (synchronize a file's in-core state with storage device).
  5. fs.fstatSync

    • Missing: fstatSync (retrieve file status using file descriptor).
  6. fs.ftruncateSync

    • Missing: ftruncateSync (truncate file to specified length with file descriptor).
  7. fs.futimesSync

    • Missing: futimesSync (change file timestamps with file descriptor).
  8. fs.globSync

    • Missing: globSync (find files matching a pattern).
  9. fs.lchmodSync

    • Missing: lchmodSync (change file mode for symbolic link).
  10. fs.lchownSync

  • Missing: lchownSync (change ownership of a symbolic link).
  1. fs.lutimesSync
  • Missing: lutimesSync (change symbolic link timestamps).
  1. fs.opendirSync
  • Missing: opendirSync (open directory for reading its contents).
  1. fs.readvSync
  • Missing: readvSync (read multiple buffers from a file descriptor).
  1. ~fs.realpathSync.native ~
  • Missing: realpathSync.native (use native realpath implementation).
  1. fs.statfsSync
  • Missing: statfsSync (retrieve filesystem statistics).
  1. fs.writevSync
  • Missing: writevSync (write multiple buffers to a file descriptor).

Methods to Remove (Deprecated or Removed):

  1. None of the methods you are currently using in the synchronous API are deprecated or removed. All the methods you are using are valid and available.

Summary:

  • 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants