Mac*_*ade 21
NSFileManager setAttributes:ofItemAtPath:error:方法怎么样?
属性是字典.您可以使用NSFileModificationDate键设置修改日期值.
基本上:
NSDictionary* attr = [NSDictionary dictionaryWithObjectsAndKeys: yourDate, NSFileModificationDate, NULL];
[[NSFileManager defaultManager] setAttributes: attr ofItemAtPath: yourPath error: NULL];
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
4961 次 |
| 最近记录: |