Ios 什么是NSdocumentdirectory';s限制尺寸?
可以存储的Ios 什么是NSdocumentdirectory';s限制尺寸?,ios,iphone,nsdocumentdirectory,Ios,Iphone,Nsdocumentdirectory,可以存储的NSDocumentdirectory的最大大小是多少 我大部分时间都在将图像保存在NSDocumentdirectory中,因为它是由iCloud备份的 现在我想知道它能存储的最大大小是多少。请提供帮助。此代码给出了确切的字节数 - (unsigned long long int)folderSize:(NSString *)folderPath { NSArray *folderArray = [[NSFileManager defaultManager] subpaths
NSDocumentdirectory
的最大大小是多少
我大部分时间都在将图像保存在NSDocumentdirectory
中,因为它是由iCloud
备份的
现在我想知道它能存储的最大大小是多少。请提供帮助。此代码给出了确切的字节数
- (unsigned long long int)folderSize:(NSString *)folderPath {
NSArray *folderArray = [[NSFileManager defaultManager] subpathsOfDirectoryAtPath:folderPath error:nil];
NSEnumerator *folderEnumerator = [folderArray objectEnumerator];
NSString *folderName;
unsigned long long int fileSize = 0;
while (folderName = [folderEnumerator nextObject]) {
NSDictionary *folderDictionary = [[NSFileManager defaultManager] fileAttributesAtPath:[folderPath stringByAppendingPathComponent:fileName] traverseLink:YES];
folderSize += [folderDictionary folderSize];
}
return folderSize;
}
希望对您有所帮助……OP想知道限制,而不是当前的使用情况。是的,我想知道最大限制,而不是大小。