Skip to content

Removing recursive watches #41

@cespare

Description

@cespare

I've implemented recursive watching for a few different projects. The way I've basically done this is:

  • Add a watch for the root dir
  • When there's a create event, walk the created dir and add new watches for all dirs
  • When there's a remove event, remove the watch for that dir

(I'm using fsnotify.v1.) I've realized that this isn't correct, because I don't delete the watches recursively. So I guess I need to keep track of the full tree of watches on my end as well? Maybe fsnotify could help out by exposing a 'delete all watches with this prefix' method or something.

Suggestions?

Additionally, #40 means that even if I could know all the dirs to remove watches for, I still couldn't delete them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions