Reputation: 1423
how to create another folder in document directory and then .I want to pass some file in that folder which is create in document directory then i want to make this folder as zip file
please help me on this how to work on this
Upvotes: 4
Views: 1739
Reputation: 1271
try this
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
NSString *dataPath = [documentsDirectory stringByAppendingPathComponent:@"/yourFolderName"];
if (![[NSFileManager defaultManager] fileExistsAtPath:dataPath])
[[NSFileManager defaultManager] createDirectoryAtPath:dataPath withIntermediateDirectories:NO attributes:nil error:&error];
Upvotes: 6