I am working on File Explorer example (thx to LFS plugin) and I need to know "root paths". For example on Windows platform I can get available root paths with following check:
local function getDisks()
local lfs = require "lfs"
local disks = {}
for i = 65, 90 do
local letter = string.char(i)
local att = lfs.attributes(letter..":/.")
if att then table.insert(disks, letter..":") end
end
return disks --> {"C:", "D:", "E:"...}
end |
But how to get them for other platforms correctly?
For example on Android I need to look at available root paths from installed file manager. I found path to my sdcard: "/storage/sdcard0" and I can work with it but I don't think every other Android device has same path.
Can I somehow get root paths for all platforms from Gideros? Or this is not possible without some extra plugin?
Comments
Likes: n1cke
It works perfect for Android and iOS:
Hovewer on Windows that `getDisks` function still must be used because "/." only gives you content of the disk with installed Windows.
Not sure about WinRT.
Likes: n1cke