> On Mar 6, 2016, at 5:04 PM, James Bucanek <[email protected]> wrote:
>
>
>> tridiak <mailto:[email protected]> March 5, 2016 at 9:14 PM
>>
>>
>> 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*)?
>
> A simpler approach would probably be to create a bookmark of the original
> file and make sure the bookmark data prefers the file ID
> (kCFURLBookmarkCreationPreferFileIDResolutionMask). Then, all you have to do
> is resolve the bookmark and get the file's new name and location (from the
> returned file URL). Very fast, very neat.
That won’t work. kCFURLBookmarkCreationPreferFileIDResolutionMask was never
implemented and the option didn’t make sense anyway (if anything, it should
have been a resolution option, not a creation option).
// deprecated
kCFURLBookmarkCreationPreferFileIDResolutionMask CF_ENUM_DEPRECATED(10_6,
10_9, 4_0, 7_0, "kCFURLBookmarkCreationPreferFileIDResolutionMask does nothing
and has no effect on bookmark resolution" ) = ( 1UL << 8 ),
> Optionally, if you use NSURL to create the bookmark, you can include the
> URL's original filename (as an URL resource) in the bookmark data. Later, the
> bookmark will provide both the original name (saved during creation) and its
> new name (obtained after resolution).
>
> _______________________________________________
> 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/luther.j%40apple.com
>
> This email sent to [email protected]
_______________________________________________
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]