Fix some iOS 4.0 deprecated method use
This commit is contained in:
parent
4fedcee49e
commit
467be16671
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue