您的位置:首页 > 其它

获取文件创建时间

2014-04-27 11:25 162 查看
#pragma mark - 获取文件创建时间
- (NSDate *) getAudioCreatDate:(NSURL*) URL
{
NSDate *creatDate;
NSFileManager *fm = [NSFileManager defaultManager];
NSDictionary *fileAttributes = [fm attributesOfItemAtPath:URL.path error:nil];
if (fileAttributes) {
if ((creatDate = [fileAttributes objectForKey:NSFileCreationDate])) {
NSLog(@"date = %@",creatDate);
return creatDate;
}
}
return nil;

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: