Is there a way I can tag a file on the hard drive, and basically, after the user moves it, the OS keeps track of the file, so when I want to access i开发者_如何学Pythont again, I just specify the tag and it tells me the location? I know that I can scan through the entire HD but that would take too long... Thanks.
if you are not supporting 10.5, but 10.6 and beyond, you might look at NSURL's
- (NSData *)bookmarkDataWithOptions:(NSURLBookmarkCreationOptions)options includingResourceValuesForKeys:(NSArray *)keys relativeToURL:(NSURL *)relativeURL error:(NSError **)error
using the NSURLBookmarkCreationOption
of:
NSURLBookmarkCreationPreferFileIDResolution
resolves the url using the fileID.
精彩评论