00001
00002
00003
00004
00005
00006
00007
00008 #import <Cocoa/Cocoa.h>
00009
00019 @interface HFFileReference : NSObject {
00020 @protected
00021 int fileDescriptor;
00022 dev_t device;
00023 unsigned long long inode;
00024 unsigned long long fileLength;
00025 mode_t fileMode;
00026 BOOL isWritable;
00027 }
00028
00029
00031 - initWritableWithPath:(NSString *)path error:(NSError **)error;
00032
00034 - initWithPath:(NSString *)path error:(NSError **)error;
00035
00037 - (void)close;
00038
00044 - (void)readBytes:(unsigned char *)buff length:(NSUInteger)length from:(unsigned long long)offset;
00045
00052 - (int)writeBytes:(const unsigned char *)buff length:(NSUInteger)length to:(unsigned long long)offset;
00053
00055 - (unsigned long long)length;
00056
00058 - (BOOL)setLength:(unsigned long long)length error:(NSError **)error;
00059
00061 - (BOOL)isEqual:(id)val;
00062
00063 @end
00064
00068 @interface HFUnprivilegedFileReference : HFFileReference
00069 @end
00070
00071 #ifndef HF_NO_PRIVILEGED_FILE_OPERATIONS
00075 @interface HFPrivilegedFileReference : HFFileReference
00076
00078 + (BOOL)preflightAuthenticationReturningError:(NSError **)error;
00079
00080 @end
00081 #endif