author | Jens Alfke <jens@mooseyard.com> |
Sun Apr 06 19:13:27 2008 -0700 (2008-04-06) | |
changeset 3 | 8fad19466c59 |
permissions | -rw-r--r-- |
jens@0 | 1 |
// |
jens@0 | 2 |
// FileAlias.h |
jens@0 | 3 |
// MYUtilities |
jens@0 | 4 |
// |
jens@0 | 5 |
// Copyright 2008 Jens Alfke. All rights reserved. |
jens@0 | 6 |
// |
jens@0 | 7 |
|
jens@0 | 8 |
#import <Foundation/Foundation.h> |
jens@0 | 9 |
|
jens@0 | 10 |
|
jens@0 | 11 |
/** A wrapper around an AliasHandle: a persistent reference to a file, which works |
jens@0 | 12 |
even if the file is moved or renamed, or its volume unmounted. */ |
jens@0 | 13 |
|
jens@0 | 14 |
@interface FileAlias : NSObject <NSCoding> |
jens@0 | 15 |
{ |
jens@0 | 16 |
AliasHandle _alias; |
jens@0 | 17 |
} |
jens@0 | 18 |
|
jens@0 | 19 |
- (id) initWithFilePath: (NSString*)path |
jens@0 | 20 |
error: (NSError**)error; |
jens@0 | 21 |
|
jens@0 | 22 |
- (id) initWithFilePath: (NSString*)path |
jens@0 | 23 |
relativeToPath: (NSString*)fromPath |
jens@0 | 24 |
error: (NSError**)error; |
jens@0 | 25 |
|
jens@0 | 26 |
- (NSString*) filePath: (NSError**)error; |
jens@0 | 27 |
- (NSString*) filePathRelativeToPath: (NSString*)fromPath error: (NSError**)error; |
jens@0 | 28 |
|
jens@0 | 29 |
- (NSArray*) findMatchesRelativeToPath: (NSString*)fromPath |
jens@0 | 30 |
withRules: (unsigned)rules // rules = kARMSearch etc. |
jens@0 | 31 |
error: (NSError**)error; |
jens@0 | 32 |
- (NSArray*) findMatches: (NSError**)error; |
jens@0 | 33 |
|
jens@0 | 34 |
- (NSString*) originalPath; |
jens@0 | 35 |
- (NSString*) originalFilename; |
jens@0 | 36 |
- (NSString*) originalVolumeName; |
jens@0 | 37 |
- (void) dump; |
jens@0 | 38 |
|
jens@0 | 39 |
@end |