Fix some iOS 4.0 deprecated method use

This commit is contained in:
Olivier Poitrey 2010-06-08 14:44:03 +02:00
parent 4fedcee49e
commit 467be16671
1 changed files with 8 additions and 2 deletions

View File

@ -30,7 +30,10 @@ static SDImageCache *instance;
if (![[NSFileManager defaultManager] fileExistsAtPath:diskCachePath]) if (![[NSFileManager defaultManager] fileExistsAtPath:diskCachePath])
{ {
[[NSFileManager defaultManager] createDirectoryAtPath:diskCachePath attributes:nil]; [[NSFileManager defaultManager] createDirectoryAtPath:diskCachePath
withIntermediateDirectories:YES
attributes:nil
error:NULL];
} }
// Init the operation queue // Init the operation queue
@ -179,7 +182,10 @@ static SDImageCache *instance;
{ {
[cacheInQueue cancelAllOperations]; [cacheInQueue cancelAllOperations];
[[NSFileManager defaultManager] removeItemAtPath:diskCachePath error:nil]; [[NSFileManager defaultManager] removeItemAtPath:diskCachePath error:nil];
[[NSFileManager defaultManager] createDirectoryAtPath:diskCachePath attributes:nil]; [[NSFileManager defaultManager] createDirectoryAtPath:diskCachePath
withIntermediateDirectories:YES
attributes:nil
error:NULL];
} }
- (void)cleanDisk - (void)cleanDisk