You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for this great sw! I'm using libfswatch to create to tool and it's working great.
I'm looking for a good way to selectively exclude stuff. Currently I start by excluding everything (".*") and then adding includes for the directories I want to watch. The problem is that editors (well, at least emacs) like to create transient files that I do not need to watch. In particular, emacs creates and deletes lockfiles as you edit. For example, if you change foo.c, then emacs will create .#foo.c, which it will delete when you save your changes.
This results in three fs change events, for for .#foo.c create, one for foo.c update, one for .#foo.c removal.
Is there a simple way to exclude such files/events? I suppose I could write some kind of regex to handle it but that would presumably incur a performance hit. Maybe that's unavoidable. Obviously the workaround is to implement my own filtering logic on the events I receive, but it would be nice if libfswatch could handle this case.
Similar problem: suppose I want to watch a directory foodir (recursively), and somewhere below it there is a directory I want to ignore - e.g. a .git directory or some such. Any way I can tell libfswatch to handle this?
I guess I'm looking for filter conjunction, i.e. "include if regex1 AND NOT regex2".
Thanks,
Gregg
The text was updated successfully, but these errors were encountered:
Thanks for this great sw! I'm using libfswatch to create to tool and it's working great.
I'm looking for a good way to selectively exclude stuff. Currently I start by excluding everything (".*") and then adding includes for the directories I want to watch. The problem is that editors (well, at least emacs) like to create transient files that I do not need to watch. In particular, emacs creates and deletes lockfiles as you edit. For example, if you change foo.c, then emacs will create
.#foo.c
, which it will delete when you save your changes.This results in three fs change events, for for
.#foo.c
create, one forfoo.c
update, one for.#foo.c
removal.Is there a simple way to exclude such files/events? I suppose I could write some kind of regex to handle it but that would presumably incur a performance hit. Maybe that's unavoidable. Obviously the workaround is to implement my own filtering logic on the events I receive, but it would be nice if libfswatch could handle this case.
Similar problem: suppose I want to watch a directory
foodir
(recursively), and somewhere below it there is a directory I want to ignore - e.g. a.git
directory or some such. Any way I can tell libfswatch to handle this?I guess I'm looking for filter conjunction, i.e. "include if regex1 AND NOT regex2".
Thanks,
Gregg
The text was updated successfully, but these errors were encountered: