I use the below to create folder in document directory , my question is , how to make this folder hidden , such that when I allow itune share this folder not appear to the user
/* Create new directory */
NSFileManager *filemgr;
NSArray *dirPaths;
NSString *docsDir;
NSString *newDir;
filemgr =[NSFileManager defaultManager];
dirPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,
NSUserDomainMask, YES);
docsDir = [dirPaths objectAtIndex:0];
newDir = [docsDir stringByAppendingPathComponent:@"Patients"];
NSLog(newDir);
if(! [self SearchForDirectory:newDir] )
{
NSLog(@"directory Not Exists");
if ([filemgr createDirectoryAtPath:newDir withIntermediateDirectories:YES attributes:nil error: NULL] == NO)
{
NSLog(@"Failed to create directory");
}
}
else{
NSLog(@"directory Exists");
}
[filemgr release];
The Documents directory is for the user’s documents. If you’re trying to hide files from there, chances are they aren’t documents and you should be storing the files in one of the other directories. What files are we talking about?
Note that including non-documents in that directory with iTunes file sharing enables is grounds for rejection from the App Store.