I'm new to the iPhone,
I created an application in which I download a book and save it in a folder called book1Folder , which is located inside the Document directory .
now I want the name of all the books in my array, there are 2 books inside book1Folder , but when I write this code, it shows me that the number of arrays is 3.
Here is my code snippet,
-(void)viewWillAppear:(BOOL)animated{ NSString *files; NSString *Dir=[self applicationDocumentsDirectory]; Dir=[Dir stringByAppendingPathComponent:@"book1Folder"]; NSDirectoryEnumerator *direnum = [[NSFileManager defaultManager] enumeratorAtPath:Dir]; Downloadedepubs = [[NSMutableArray alloc]init]; while(files = [direnum nextObject]) { if([[files pathExtension] isEqualToString:@"epub"]) NSLog(@"files=%@",files); [Downloadedepubs addObject:files]; } }
Only the name of 2 books is displayed in my journal, but when I loop through array contains 3 objects.
[Downloadedepubs ObjectAtIndex:0]=.DS_Store; [Downloadedepubs ObjectAtIndex:1]=abcd; [Downloadedepubs ObjectAtIndex:2]=pqrs;
What is this .DS_Store , why is it coming?
Any help would be appreciated.
source share