tags:

views:

47

answers:

1
+1  Q: 

What is .DS_Store

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

+1  A: 

The .DS_Store file is a file created by Mac OS X that holds meta-information about a directory. You can expect to always find it and can safely ignore it. The file is not shown by the Finder.

Greg Hewgill
Also, this file will not be present on the iPhone device. The only reason you see it when testing in the Simulator is that the Simulator uses the Mac OS X filesystem.
Jasarien