I\'ve a list of paths like this
/mnt/sdcard/folder1/a/b/file1
/mnt/sdcard/folder1/a/b/file2
/mnt/sdcard/folder1/a/b/file3
/mnt/sdcard/folder1/a/b/file4
/mnt/sdc
I would recommend reading up on data structures, particularly trees. In Java, you can represent these by creating a node class that has references to other nodes. For example:
public class Node {
private Node[] children;
/* snip other fields */
public boolean isFile() {
return children.count == 0;
}
}
Obviously, you can store your node references anyway you like- arrays or collections will work with non-binary trees.
Given your list of files, you can read these and populate your tree structure.