Update SDWebImageTestCache.m
Co-authored-by: DreamPiggy <lizhuoli1126@126.com>
This commit is contained in:
parent
e524ca0310
commit
dcd0c46b7f
|
@ -91,7 +91,7 @@ static NSString * const SDWebImageTestDiskCacheExtendedAttributeName = @"com.hac
|
||||||
- (void)removeExpiredData {
|
- (void)removeExpiredData {
|
||||||
NSDate *expirationDate = [NSDate dateWithTimeIntervalSinceNow:-self.config.maxDiskAge];
|
NSDate *expirationDate = [NSDate dateWithTimeIntervalSinceNow:-self.config.maxDiskAge];
|
||||||
NSURL *diskCacheURL = [NSURL fileURLWithPath:self.cachePath isDirectory:YES];
|
NSURL *diskCacheURL = [NSURL fileURLWithPath:self.cachePath isDirectory:YES];
|
||||||
NSArray<NSString *> *resourceKeys = @[NSURLIsDirectoryKey, NSURLAttributeContentAccessDateKey];
|
NSArray<NSString *> *resourceKeys = @[NSURLIsDirectoryKey, NSURLContentAccessDateKey];
|
||||||
NSDirectoryEnumerator<NSURL *> *fileEnumerator = [self.fileManager enumeratorAtURL:diskCacheURL
|
NSDirectoryEnumerator<NSURL *> *fileEnumerator = [self.fileManager enumeratorAtURL:diskCacheURL
|
||||||
includingPropertiesForKeys:resourceKeys
|
includingPropertiesForKeys:resourceKeys
|
||||||
options:NSDirectoryEnumerationSkipsHiddenFiles
|
options:NSDirectoryEnumerationSkipsHiddenFiles
|
||||||
|
|
Loading…
Reference in New Issue