gpt4 book ai didi

iphone - 什么是.DS_Store

转载 作者:行者123 更新时间:2023-12-03 19:15:09 24 4
gpt4 key购买 nike

我希望使用下面的代码列出文档目录中的所有文件

for(NSString *path in [manager contentsOfDirectoryAtPath:[self appDelegate].gCurrentPath_AppDelegate
error:nil])
{

NSDictionary *modData=[manager attributesOfItemAtPath:
[appDelegate.gCurrentPath_AppDelegate
stringByAppendingPathComponent:path ]
error:nil ];
NSDate * dateModified=(NSDate *) [modData objectForKey:NSFileModificationDate];

NSNumber *fileSize=[modData objectForKey:NSFileSize] ;


FileObj *newobj=[[FileObj alloc] init ];

NSString *ss=[[NSString alloc] initWithFormat:@"%@",path] ;
[newobj setfileName:ss];
[ss release];

[ fileArray addObject:newobj];//fileArray: the data source of UITableView
[newobj release];
}

我发现列表中有一个名为“.DS_Store”的文件。我浏览了模拟器目录,没有找到这个文件在哪里。

最佳答案

.DS_Store 文件是由 Mac OS X 创建的文件,用于保存有关目录的元信息。您可以期望总能找到它并且可以安全地忽略它。 Finder 不显示该文件。

关于iphone - 什么是.DS_Store,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2644265/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com