Revision cb6abe72 pithos-macos/PithosLocalObjectState.m
b/pithos-macos/PithosLocalObjectState.m | ||
---|---|---|
68 | 68 |
} |
69 | 69 |
|
70 | 70 |
+ (id)localObjectState { |
71 |
return [[[self alloc] init] autorelease];
|
|
71 |
return [[self alloc] init];
|
|
72 | 72 |
} |
73 | 73 |
|
74 | 74 |
+ (id)localObjectStateWithFile:(NSString *)aFilePath blockHash:(NSString *)blockHash blockSize:(NSUInteger)blockSize { |
75 |
return [[[self alloc] initWithFile:aFilePath blockHash:blockHash blockSize:blockSize] autorelease];
|
|
75 |
return [[self alloc] initWithFile:aFilePath blockHash:blockHash blockSize:blockSize];
|
|
76 | 76 |
} |
77 | 77 |
|
78 | 78 |
+ (id)localObjectStateWithHash:(NSString *)aHash directory:(BOOL)anIsDirectory { |
79 |
return [[[self alloc] initWithHash:aHash directory:anIsDirectory] autorelease];
|
|
79 |
return [[self alloc] initWithHash:aHash directory:anIsDirectory];
|
|
80 | 80 |
} |
81 | 81 |
|
82 | 82 |
- (void)dealloc { |
83 |
[fileSize release]; |
|
84 |
[fileModificationDate release]; |
|
85 | 83 |
self.tmpFilePath = nil; |
86 |
[filePath release]; |
|
87 |
[hash release]; |
|
88 |
[super dealloc]; |
|
89 | 84 |
} |
90 | 85 |
|
91 | 86 |
- (NSString *)description { |
... | ... | |
134 | 129 |
error:error]; |
135 | 130 |
} |
136 | 131 |
} |
137 |
[tmpFilePath release]; |
|
138 |
tmpFilePath = [aTmpFilePath retain]; |
|
132 |
tmpFilePath = aTmpFilePath; |
|
139 | 133 |
} |
140 | 134 |
} |
141 | 135 |
|
142 | 136 |
- (void)setHash:(NSString *)aHash { |
143 |
[hash release]; |
|
144 | 137 |
if ([aHash length] == 64) |
145 |
hash = [aHash retain];
|
|
138 |
hash = aHash;
|
|
146 | 139 |
else |
147 | 140 |
hash = nil; |
148 | 141 |
if (filePath) { |
Also available in: Unified diff