How to convert file path to file
1 answer
You can do it
private String root="/";
private List<String> item = new ArrayList<String>();
private List<String> path = new ArrayList<String>();
File f = new File(dirPath);
File[] files = f.listFiles();
if(!dirPath.equals(root)){
item.add(root);
path.add(root);
item.add("../");
path.add(f.getParent());
}
Implement a simple explorer in Android
+1
source to share