0
NSURL* suppurl = [manager URLForDirectory:NSApplicationSupportDirectory inDomain:NSUserDomainMask appropriateForURL:nil create:YES error:nil];
NSString *path = [suppurl path];
NSLog(@" Path %@",path);
NSString* myfolder = [path stringByAppendingPathComponent:@"MyFolder"];
NSDirectoryEnumerator* myFolderDir = [manager enumeratorAtPath:myfolder];
for (NSString* file in myFolderDir)
{
NSLog(@" file %@",file);
NSString *getImagePath = [path stringByAppendingPathComponent:[NSString stringWithFormat:@"%@",file]];
BOOL exists = [[NSFileManager defaultManager] fileExistsAtPath:getImagePath];
NSLog(@" image path %@",getImagePath);
if (exists)
{
NSLog(@" exists");
}
第一个NSLog(@" file %@",file);
成功记录文件名...但BOOL存在不。从应用程序目录中检索文档
可能是什么问题?
感谢lot..it工作.. – Shubhank 2012-02-23 12:13:51
不能接受你的答案,直到3分钟.. – Shubhank 2012-02-23 12:14:13