WebFreak001 / FSWatch

A cross-platform folder & file watching library using win32, inotify or std.file
33 stars 8 forks source link

Checking a file or directory #24

Open bagomot opened 2 years ago

bagomot commented 2 years ago

How to check if event.path is a file or a directory in an event? isDir and isFile don't work with it.

In my application, I want to check if a file in a directory has changed, but at the same time I get a notification that its directory has changed. I need to get just for the file.

WebFreak001 commented 2 years ago

for now for create events you should be able to use isDir/isFile with event.path and for rename events you should be able to use isDir/isFile with event.newPath