Page 1 of 1
Creating A Directory - Android
Posted: Tue Dec 22, 2015 10:03 am
by Googie85
Hey Guys!
I am having trouble with creating a directory on my Android tablet. I am using the following;
create directory "/mnt/sdcard/MyApp/Test"
I have also tried create folder but to no avail...
Any help is appreciated,
Many Thanks,
Matthew.
Re: Creating A Directory - Android
Posted: Tue Dec 22, 2015 11:28 am
by Dixie
Hi...
To create a folder on your tablet and at the same time, say an empty text file... try this
Code: Select all
on openStack
set the defaultFolder to specialFolderPath("documents")
if there is not a folder "myfolder" then
create folder "myfolder"
set the defaultFolder to specialFolderPath("documents") & "/myfolder
put empty into URL("file:" & "mytextstuff")
end if
end openStack
Other standard file locations can be queried using the specialFolderPath() function. The following paths are supported on Android:
engine – the (virtual) path to the engine and its assets
documents – the path to a folder to use for per-application data files
cache – the path to a folder to use for transient per-application data files
The Android filesystem is case-sensitive – this is different from (most) Mac installs and Windows so take care to ensure that you consistently use the same casing of filenames when constructing them.
Re: Creating A Directory - Android
Posted: Tue Dec 22, 2015 7:50 pm
by jacque
Be sure that you have selected "Write external storage" in the Android standalone settings. Also, be aware that devices may see external storage differently so the path may not be the same on all devices. On my Samsung S5 the path to external storage is "/sdcard/". On other devices it may be in "/mnt/" as you have it (I think it was that way on my S4 but I don't have a card in that one any more so I can't check.)