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想知道限制,而不是当前的使用情况。是的,我想知道最大限制,而不是大小。