BathyScapheのアイコンセット生成&適用ツール
リビジョン | 9220d0325b70b0681fce08acd1d27b64a7c02b82 (tree) |
---|---|
日時 | 2012-05-21 23:18:03 |
作者 | masakih <masakih@user...> |
コミッター | masakih |
[Mod] Deprecatedメソッドを新しいメソッドに変更。
@@ -223,8 +223,15 @@ final: | ||
223 | 223 | if( tmp ) result = tmp; |
224 | 224 | [result retain]; |
225 | 225 | |
226 | + NSError *error = NULL; | |
226 | 227 | if( ![[NSFileManager defaultManager] fileExistsAtPath:result] ) { |
227 | - [[NSFileManager defaultManager] createDirectoryAtPath:result attributes:nil]; | |
228 | + [[NSFileManager defaultManager] createDirectoryAtPath:result | |
229 | + withIntermediateDirectories:YES | |
230 | + attributes:nil | |
231 | + error:&error]; | |
232 | + if(!error) { | |
233 | + NSLog(@"%@", error); | |
234 | + } | |
228 | 235 | } |
229 | 236 | } |
230 | 237 |
@@ -265,7 +272,7 @@ final: | ||
265 | 272 | NSArray *imageFileType = [NSImage imageFileTypes]; |
266 | 273 | |
267 | 274 | NSFileManager *fm = [NSFileManager defaultManager]; |
268 | - NSArray *files = [fm directoryContentsAtPath:bathyScapheResourceFolder]; | |
275 | + NSArray *files = [fm contentsOfDirectoryAtPath:bathyScapheResourceFolder error:NULL]; | |
269 | 276 | NSEnumerator *filesEnum = [files objectEnumerator]; |
270 | 277 | NSString *file; |
271 | 278 | NSString *fullPath; |
@@ -283,7 +290,7 @@ final: | ||
283 | 290 | if( [managed containsObject:[file stringByDeletingPathExtension]] && |
284 | 291 | ([imageFileType containsObject:filetype] |
285 | 292 | || [imageFileType containsObject:extention]) ) { |
286 | - [fm removeFileAtPath:fullPath handler:nil]; | |
293 | + [fm removeItemAtPath:fullPath error:NULL]; | |
287 | 294 | } |
288 | 295 | } |
289 | 296 | } |
@@ -39,7 +39,10 @@ | ||
39 | 39 | _path = [tmpDir stringByAppendingPathComponent:folderName]; |
40 | 40 | |
41 | 41 | if( ![fm fileExistsAtPath:_path] && |
42 | - [fm createDirectoryAtPath:_path attributes:nil] ) { | |
42 | + [fm createDirectoryAtPath:_path | |
43 | + withIntermediateDirectories:NO | |
44 | + attributes:nil | |
45 | + error:NULL] ) { | |
43 | 46 | created = YES; |
44 | 47 | } |
45 | 48 | } while( !created ); |