Apple开发_获取文件创建时间
复制/**
* @brief 获取文件创建时间
*
* @param file_path 文件所在的绝对路径
* @return 文件创建时间
*/
- (NSDate *)file_Creat_Date:(NSString *)file_path {
NSFileManager *file_mgr = [NSFileManager defaultManager];
// 这里包含着这个文件的所有相关信息
NSDictionary *file_attr = [file_mgr attributesOfItemAtPath:file_path error:nil];
if (file_attr) {
NSDate *creat_date = [file_attr objectForKey:NSFileCreationDate];
if (creat_date) {
return creat_date;
}
}
return nil;
}
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 【设计模式】告别冗长if-else语句:使用策略模式优化代码结构
· 字符编码:从基础到乱码解决
· 提示词工程——AI应用必不可少的技术