Allow creating directory

Please let us create custom directories under documents or temp

Something like

io.createDirectory(“mydirectory”, system.DocumentsDirectory);

or

os.create(“mydirectory”, system.DocumentsDirectory); [import]uid: 44071 topic_id: 22333 reply_id: 322333[/import]

did you try the mkdir with os.execute ? [import]uid: 3826 topic_id: 22333 reply_id: 89020[/import]

How would I know the path to the documents folder? system.DocumentsDirectory is not a string… [import]uid: 44071 topic_id: 22333 reply_id: 89024[/import]

but a string is what it provides you when you use it to create a path for a file or a directory.

See pathForFile [import]uid: 3826 topic_id: 22333 reply_id: 89025[/import]

Use LuaFileSystem.  See:

http://www.coronalabs.com/blog/2012/05/08/luafilesystem-lfs-tutorial/

system.DocumentsDirectory and such return data structures, not strings that you can simply append too.  The system doesn’t want you to know exactly where they are.    @dsadites answer of using the LFS is the right one.  After that when you use system.pathForFile(), you specify:

local path = system.pathForFile(" yourdirectorynamehere/ yourfilename.here", system.DocumentsDirectory)

 

That is of course after you’ve made that directory using LFS.

Use LuaFileSystem.  See:

http://www.coronalabs.com/blog/2012/05/08/luafilesystem-lfs-tutorial/

system.DocumentsDirectory and such return data structures, not strings that you can simply append too.  The system doesn’t want you to know exactly where they are.    @dsadites answer of using the LFS is the right one.  After that when you use system.pathForFile(), you specify:

local path = system.pathForFile(" yourdirectorynamehere/ yourfilename.here", system.DocumentsDirectory)

 

That is of course after you’ve made that directory using LFS.