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.