jens@0: // jens@0: // FileAlias.h jens@0: // MYUtilities jens@0: // jens@0: // Copyright 2008 Jens Alfke. All rights reserved. jens@0: // jens@0: jens@0: #import jens@0: jens@0: jens@0: /** A wrapper around an AliasHandle: a persistent reference to a file, which works jens@0: even if the file is moved or renamed, or its volume unmounted. */ jens@0: jens@0: @interface FileAlias : NSObject jens@0: { jens@0: AliasHandle _alias; jens@0: } jens@0: jens@0: - (id) initWithFilePath: (NSString*)path jens@0: error: (NSError**)error; jens@0: jens@0: - (id) initWithFilePath: (NSString*)path jens@0: relativeToPath: (NSString*)fromPath jens@0: error: (NSError**)error; jens@0: jens@0: - (NSString*) filePath: (NSError**)error; jens@0: - (NSString*) filePathRelativeToPath: (NSString*)fromPath error: (NSError**)error; jens@0: jens@0: - (NSArray*) findMatchesRelativeToPath: (NSString*)fromPath jens@0: withRules: (unsigned)rules // rules = kARMSearch etc. jens@0: error: (NSError**)error; jens@0: - (NSArray*) findMatches: (NSError**)error; jens@0: jens@0: - (NSString*) originalPath; jens@0: - (NSString*) originalFilename; jens@0: - (NSString*) originalVolumeName; jens@0: - (void) dump; jens@0: jens@0: @end