IOS获取文件属性
来源:互联网 发布:php用什么服务器 编辑:程序博客网 时间:2024/06/06 09:11
NSDictionary *attributes = [[NSFileManagerdefaultManager] attributesOfItemAtPath:patherror:nil];
if (attributes != nil) {
NSNumber *fileSize = [attributes objectForKey:NSFileSize];
NSString *accountName = [attributes objectForKey:NSFileOwnerAccountName];
NSString *createDate = [attributes objectForKey:NSFileCreationDate];
NSDate *modifyDate = [attributes objectForKey:NSFileModificationDate];
//文件大小
if (fileSize) {
NSLog(@"File size: %qi\n", [fileSizeunsignedLongLongValue]);
}
//文件创建日期
if (createDate) {
NSLog(@"File creationDate: %@\n", createDate);
//textField.text=NSFileCreationDate;
}
//文件所有者
if (accountName) {
NSLog(@"Owner: %@\n", accountName);
}
//文件修改日期
if (modifyDate) {
NSLog(@"Modification date: %@\n", modifyDate);
}
}
- IOS获取文件属性
- iOS 获取文件属性 NSDirectoryEnumerator 文件大小
- IOS获取plist文件属性值的方法
- ios 文件管理 获取文件属性 读取文件
- iOS 遍历Document 文件夹 并获取文件属性
- IOS获取plist文件属性值的方法
- IOS获取文件属性。(包括创建日期)
- iOS获取plist文件属性值的方法
- ios开发之获取修改文件属性
- 获取文件属性
- 获取文件属性
- 获取文件属性
- 获取文件属性
- 文件属性获取
- iOS 文件属性
- [Python]获取文件属性
- C#获取文件属性
- wince下获取文件属性
- Java初学习 - 异常处理Throwable类
- jquery easyui ‘rowspan’ 为空或不是对象 .
- Android 来电翻转静音实现源码
- memcache的存储步骤
- Android fill_parent、wrap_content和match_parent的区别
- IOS获取文件属性
- 生成区间范围内的随机日期
- BZOJ 1409 Password 矩阵乘法+线性筛
- Makefile的@解释
- 获取已安装应用列表
- 个人BLOG
- 同步,异步,阻塞,非阻塞
- 后缀名“.dll .obj .lib”和“ .so .o .a”文件的区别含义
- JAVA设计模式之 桥接模式【Bridge Pattern】