Hi. You asked me a follow-up question via PM that is closely related to this so I’ll post the answer here.
Also, for future reference I like all my conversations about anything that may help others to be public.
The thrust of your follow-up question, if I understood it, was: “How do I access the Android (internal and/or external) storage?”
While I don’t know specifically how to access, say a plug-in memory card, I can get you started.
The basic answer is, start at root and work your way to the folder you want.
This code will build up the path for the root folder (ends up just being ‘/’):
local root = ssk.files.desktop.getDrivePath( "/" )
After that, you can build paths to any depth you are allowed access to.
To help with this, and the common task of finding files in a folder, and or finding a hierarchy, I have some hidden features in SSK2’s files.* module:
Misc - Utilities ---------------- util.getFilesInFolder( path ) util.findAllFiles( path ) util.keepFileTypes( filesTbl ) util.getLuaFiles( filesTbl ) util.getResourceFiles( filesTbl ) util.flattenNames( filesTbl )
By way of example, this code will return a table containing a list of all files/folders found found in ‘/’
-- ============================================================= require "ssk2.loadSSK" \_G.ssk.init() -- ============================================================= local files = ssk.files local root = ssk.files.desktop.getDrivePath( "/" ) local rootFiles = files.util.getFilesInFolder( root ) if( #rootFiles == 0 ) then rootFiles = { "No Files Found" } end table.dump(rootFiles)
Here is a link to a simple project like the code above that dumps what it found to a pop-up scrollable widget:
https://github.com/roaminggamer/RG_FreeStuff/blob/master/AskEd/2017/08/androidPaths.zip