attributesOfItemAtPath获取文件的大小、文件的内容等属性

- (NSDictionary *)attributesOfItemAtPath:(NSString *)path error:(NSError **)error NS_AVAILABLE(10_5, 2_0);



<span style="font-size:14px;"> NSDictionary *attributes = [[NSFileManager defaultManager] attributesOfItemAtPath:@"/Users/hechong/Desktop/NewZxing.zip"
                                                                                error:nil];
    NSLog(@"attributes:%@",attributes);//获取文件的属性



attributes:{
    NSFileCreationDate = "2014-10-24 16:32:51 +0000";
    NSFileExtendedAttributes =     {
        "com.apple.quarantine" = <30303032 3b353436 64343431 323b5361 66617269 3b324442 31303037 422d4530 33432d34 3633432d 42423442 2d444638 41383544 31363437 31>;
    };
    NSFileExtensionHidden = 0;
    NSFileGroupOwnerAccountID = 20;
    NSFileGroupOwnerAccountName = staff;
    NSFileModificationDate = "2014-10-24 16:32:51 +0000";
    NSFileOwnerAccountID = 501;
    NSFilePosixPermissions = 420;
    NSFileReferenceCount = 1;
    NSFileSize = 1093489;
    NSFileSystemFileNumber = 10352334;
    NSFileSystemNumber = 16777218;
    NSFileType = NSFileTypeRegular;
}
</span>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值