For example if I want to write file.txt into /folder1/folder2/folder3/ and noone of folders exists.
Is it the only way to create them manually?
For example if I want to write file.txt into /folder1/folder2/folder3/ and noone of folders exists.
Is it the only way to create them manually?
You can use createDirectoryAtPath:withIntermediateDirectories:attributes:error:
with YES in the intermediate directories parameter to create all the folders you need in the path.
Try that it should do the job: