A bit more information
[self createFolder:@"test"];
+ (void)createFolder:(NSString*)folder
{
NSFileManager *fileManager = [NSFileManager defaultManager];
NSString *documentsPath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0];
NSString *thePath = [documentsPath stringByAppendingPathComponent:folder];
NSError *error = nil;
[fileManager createDirectoryAtPath:thePath withIntermediateDirectories:YES attributes:nil error:&error];
}
Error Domain=NSCocoaErrorDomain Code=513 "You don’t have permission to save the file “test” in the folder “Documents”." UserInfo={NSFilePath=/var/mobile/Containers/Data/Application/A64A699C-2441-49CF-8DA3-1188CC0E67D6/Documents/test, NSUnderlyingError=0x147d75170 {Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted"}}