Hello everyone
I hope to list all files in document directory using codes below
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];
}
I found that there is a file with name ".DS_Store' in the list. I browsed the simulator directory and can not found where is this file.
Welcome any comment
Thanks
interdev