How to obtain the size of a Application Directory in iPhone?
问题 (NSString *) getApplicationUsage{ double directorySizeInBytes = 0.0f; NSArray *paths = NSSearchPathForDirectoriesInDomains(NSApplicationDirectory, NSUserDomainMask, YES); NSString *pathStr = [paths objectAtIndex:0]; pathStr = [pathStr stringByDeletingLastPathComponent]; //REMOVE THE LAST PATH COMPONENT i.e /Applications NSDirectoryEnumerator *enumrator = [[NSFileManager defaultManager] enumeratorAtPath:pathStr]; for (NSString *itemPath in enumrator) { itemPath = [pathStr