don't receive the event when i remove a file inside observed folder
Closed this issue · 1 comments
i don't recive an event when i remove a file inside the observed folder, and when i create a file inside the observed folder i have an event but it's 4 seconds after
let paths: [String] = [file.url.absoluteString]
let handler = { event in
print(event)
}
let s = try EonilFSEventStream(pathsToWatch: paths,
sinceWhen: .now,
latency: 0,
flags: [.fileEvents, .noDefer],
handler: handler)
s.setDispatchQueue(DispatchQueue.main)
try s.start()
Hello @amine2233 , sorry for late reply.
I can't reproduce your issue on my local machine. Can you explain me some more details? Like actual directory file structure? 4 seconds delays sounds like some kind of bottleneck. Do you have massive amount of file operations?
Just to be clear, this library is a thin wrapper around Apple's FSEvents API. That is not designed for precise tracking of all files. The FSEvents service may omit some kind of notifications under certain condition. Please check whether you have one of cases described in this document: https://developer.apple.com/library/archive/documentation/Darwin/Conceptual/FSEvents_ProgGuide/TechnologyOverview/TechnologyOverview.html#//apple_ref/doc/uid/TP40005289-CH3-SW1