Skip to content

Subtree watch on Windows #21

@nathany

Description

@nathany

@htoothrot mentioned at howeyc/fsnotify#56 (comment)

ReadDirectoryChanges[1] has a "bWatchSubtree" argument. If this argument is true, you will receive events for all files/directories for the whole directory tree rooted at the given directory.

As watching a large/busy tree can lead to many events I thought this was worth bringing up: It may be helpful to have the buffer size configurable in some way. Right now it's a hard coded 4096 bytes. When many events fire quickly, events can be dropped when the buffer is full. There are caveats to simply increasing the size (http://stackoverflow.com/a/3250454 explains some of the issues) and it seems there's not one answer to fit all uses.

Also look into FindFirstChangeNotification

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions