arachide
arachide

Reputation: 8066

What is .DS_Store

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.

Upvotes: 4

Views: 1513

Answers (1)

Greg Hewgill
Greg Hewgill

Reputation: 993273

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.

Upvotes: 4

Related Questions