diff -r 000000000000 -r 256370e8935a FileAlias.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/FileAlias.h Sun May 03 10:13:31 2009 -0700 @@ -0,0 +1,39 @@ +// +// FileAlias.h +// MYUtilities +// +// Copyright 2008 Jens Alfke. All rights reserved. +// + +#import + + +/** A wrapper around an AliasHandle: a persistent reference to a file, which works + even if the file is moved or renamed, or its volume unmounted. */ + +@interface FileAlias : NSObject +{ + AliasHandle _alias; +} + +- (id) initWithFilePath: (NSString*)path + error: (NSError**)error; + +- (id) initWithFilePath: (NSString*)path + relativeToPath: (NSString*)fromPath + error: (NSError**)error; + +- (NSString*) filePath: (NSError**)error; +- (NSString*) filePathRelativeToPath: (NSString*)fromPath error: (NSError**)error; + +- (NSArray*) findMatchesRelativeToPath: (NSString*)fromPath + withRules: (unsigned)rules // rules = kARMSearch etc. + error: (NSError**)error; +- (NSArray*) findMatches: (NSError**)error; + +- (NSString*) originalPath; +- (NSString*) originalFilename; +- (NSString*) originalVolumeName; +- (void) dump; + +@end