Hi !
I was wanting to create a new pasture inside the user’s device, that is, inside the root folder, but it does not seem to me that anyone has tried this before, so I tried to do the following:
First, I thought the following: "If I want to create a folder inside the root folder,
I will need to know the root folder path first," then I found that there is a pattern
and the path is: _ “/storage/emulated/0/” _
Then, i tried make this:
local lfs = require( "lfs" ) -- Get raw path to the app temporary directory local temp\_path = system.pathForFile( "", "/storage/emulated/0/" ) -- Change current working directory local success = lfs.chdir( temp\_path ) --returns true on success local new\_folder\_path if ( success ) then lfs.mkdir( "NovaPasta" ) new\_folder\_path = lfs.currentdir() .. "/NovaPasta" end
* link of api
https://docs.coronalabs.com/api/library/lfs/index.html
But as I already imagined, it did not work … Does anyone know how I can create a new folder inside the root folder of the device? (The folder that I call root folder, is the one in which you have all the folders of the phone, the Whatsapp folder, Download, etc …)