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