Expose the wd ?
Terry-Mao opened this issue · 3 comments
Terry-Mao commented
If i watch a file and a dir, without the wd how can i distinguish file and dir?
howeyc commented
Basically like embedding the os.FileInfo inside the FileEvent structure?
Also, couldn't you just call os.Stat()?
Terry-Mao commented
such as:
addWatch(file)
then
addWatch(dir)
and other addWatch.....
if file and dir have same name, it's hard to handle this situation...
in my view, addWatch return the wd to the caller, so one can use the wd to distinguish all the watch path
sth like:
if ev.WD == myfilewd {
} else ev.WD == mydirwd {
}
howeyc commented
Which OS lets you have a file and directory of the same name at the same time?