Repository navigation
Conversation
benjamingr
reviewed
Feb 2, 2021
benjamingr
reviewed
Feb 2, 2021
benjamingr
reviewed
Feb 2, 2021
benjamingr
reviewed
Feb 2, 2021
benjamingr
reviewed
Feb 2, 2021
benjamingr
reviewed
Feb 2, 2021
benjamingr
reviewed
Feb 2, 2021
benjamingr
reviewed
Feb 2, 2021
benjamingr
reviewed
Feb 2, 2021
benjamingr
left a comment
Member
There was a problem hiding this comment.
Good start and interesting API.
LMK if you'd like me to PR signal support for fs.watch or help otherwise.
aduh95
reviewed
Feb 2, 2021
4 of 11 tasks
This comment has been minimized.
This comment has been minimized.
benjamingr
reviewed
Feb 2, 2021
benjamingr
approved these changes
Feb 2, 2021
This comment has been minimized.
This comment has been minimized.
jasnell
force-pushed
the
async-fs-watch
branch
from
February 2, 2021 18:21
782db4b to
a8ea9e3
Compare
This comment has been minimized.
This comment has been minimized.
Collaborator
added 2 commits
February 15, 2021 06:59
An alternative to `fs.watch()` that returns an `AsyncIterator`
```js
const { watch } = require('fs/promises');
(async () => {
const ac = new AbortController();
const { signal } = ac;
setTimeout(() => ac.abort(), 10000);
const watcher = watch('file.txt', { signal });
for await (const { eventType, filename } of watcher) {
console.log(eventType, filename);
}
})()
```
Signed-off-by: James M Snell <jasnell@gmail.com>
jasnell
force-pushed
the
async-fs-watch
branch
from
February 15, 2021 14:59
a07a6ac to
6e27a09
Compare
Collaborator
commented
Feb 15, 2021
Member
Author
|
Landed in 9803729 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
An alternative to
fs.watch()that returns anAsyncIteratorSigned-off-by: James M Snell jasnell@gmail.com