【问题标题】:The size of the operating system iOSiOS操作系统的大小
【发布时间】:2015-07-17 21:54:07
【问题描述】:

如何获取iOS操作系统的大小,精确到字节。我想知道操作系统的大小精确到字节,如果可以,我可以识别设备。

【问题讨论】:

    标签: ios size byte system


    【解决方案1】:

    我相信这应该可以帮助你...

    -(float)getFreeSpace{  
    float freeSpace = 0.0f;  
    NSError *error = nil;  
    NSDictionary *dictionary = [[NSFileManager defaultManager] attributesOfFileSystemForPath:kSongsFolder error: &error];  
    
    if (dictionary) {  
        NSNumber *fileSystemFreeSizeInBytes = [dictionary objectForKey: NSFileSystemFreeSize];  
        NSLog(@"%d",fileSystemFreeSizeInBytes);
        freeSpace = [fileSystemFreeSizeInBytes floatValue];  
    } else { 
        //Handle error
    }  
    return freeSpace; 
    

    }

    【讨论】:

      猜你喜欢
      • 2013-12-05
      • 2020-01-16
      • 2017-08-30
      • 1970-01-01
      • 2011-05-04
      • 1970-01-01
      • 2011-05-19
      • 2013-07-29
      相关资源
      最近更新 更多