> On 6/03/2016, at 6:46 am, Dominic Giampaolo <[email protected] > <mailto:[email protected]>> wrote: > > >> >> I have a FSEventStream which notifies me of name changes in a hierarchy. >> I noticed when I get the name change of an item that it is sent twice. >> The old name and the new name. >> Also noticed the old name has an FSEventStreamEventId of X and the new name >> has FSEventStreamEventId of X+1. >> I have tried with multiple file renames (before the next latency callback), >> and the new names' ID seems to be always +1 greater than the old names' ID. >> >> My question : is the ID of the new name always guaranteed to +1 the ID of >> the old name? >> > No. > > It also sounds like you're trying to "replay" the events you receive. You > should never try to do that. The only thing you can do with an fsevent is to > go look at the path to see if the thing is still there and if it is, then to > compare it to whatever prior state you have for the object at that path. > > I'll state it again for clarity: you can *never* use an fsevent stream to to > replace a sequence of file system operations. > > > --dominic >
I want a way to know a file what a file’s new name is. Having event ID X (old name) & X+1 (new name) for file rename (& move) would be really useful. Is there another way to find out what a file’s new name is? I am currently iterating through the parent directory comparing file sys IDs to get the new name. A file's file ID will never changed under rename (or move*)? * moving to a different volume, the file sys ID will change.
_______________________________________________ Do not post admin requests to the list. They will be ignored. Filesystem-dev mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/filesystem-dev/archive%40mail-archive.com This email sent to [email protected]
