1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/FileAlias.h Tue Apr 07 11:13:25 2009 -0700
1.3 @@ -0,0 +1,39 @@
1.4 +//
1.5 +// FileAlias.h
1.6 +// MYUtilities
1.7 +//
1.8 +// Copyright 2008 Jens Alfke. All rights reserved.
1.9 +//
1.10 +
1.11 +#import <Foundation/Foundation.h>
1.12 +
1.13 +
1.14 +/** A wrapper around an AliasHandle: a persistent reference to a file, which works
1.15 + even if the file is moved or renamed, or its volume unmounted. */
1.16 +
1.17 +@interface FileAlias : NSObject <NSCoding>
1.18 +{
1.19 + AliasHandle _alias;
1.20 +}
1.21 +
1.22 +- (id) initWithFilePath: (NSString*)path
1.23 + error: (NSError**)error;
1.24 +
1.25 +- (id) initWithFilePath: (NSString*)path
1.26 + relativeToPath: (NSString*)fromPath
1.27 + error: (NSError**)error;
1.28 +
1.29 +- (NSString*) filePath: (NSError**)error;
1.30 +- (NSString*) filePathRelativeToPath: (NSString*)fromPath error: (NSError**)error;
1.31 +
1.32 +- (NSArray*) findMatchesRelativeToPath: (NSString*)fromPath
1.33 + withRules: (unsigned)rules // rules = kARMSearch etc.
1.34 + error: (NSError**)error;
1.35 +- (NSArray*) findMatches: (NSError**)error;
1.36 +
1.37 +- (NSString*) originalPath;
1.38 +- (NSString*) originalFilename;
1.39 +- (NSString*) originalVolumeName;
1.40 +- (void) dump;
1.41 +
1.42 +@end