views:

1054

answers:

1

Hi to all I want to know how to create a directory on a specified path. I used "system("path of directory");" this is work fine in Simulator but not on Device

+3  A: 

Try the NSFileManager class and the createDirectoryAtPath:attributes: message.

Nick Bedford
thanks for answerone more question:-how i change mod of Directory something like thisSystem("chmod +x /User/.../Mydirectory");.This is possible on Simulator but on device this is not working. Any Idea where i m wrong
Take a look at the documentation for "setAttributes:ofItemAtPath:error:". Looks like you will need to set up an attributes dictionary containing the file permissions.
Nick Bedford
Not clear why; iPhone applications are sandboxed and, thus, the files are pretty darned isolated.
bbum