Consider code snippet:
String[] roots = FileSystemStorage.getInstance().getRoots();
String root = roots[0];
for (int i = 0; i < roots.length; i++) {
if (FileSystemStorage.getInstance().getRootType(roots[i]) == FileSystemStorage.ROOT_TYPE_MAINSTORAGE) {
root = roots[i];
break;
}
}
return root;
On Android device, atleast in my case, this returns format : "/storage/emulated/0 .." but on iOS something like "file://var/mobile...". Is this intentional ? Why does iOS add "file://" ? It took me hours to find out why file paths resolve correctly on Android (i was repending file:// ) and not on iOS.