hi ,
in my project i need to list system files as a tree structure so i used below class and other respective class to populate tree listing all folders and sub folders od D drive. but it's not populated.i don't wether it's right way or not ?
public class FileSystemBean {
private static String SRC_PATH = "/D://";
private FileSystemNode[] srcRoots;
public synchronized FileSystemNode[] getSourceRoots() {
if (srcRoots == null) {
srcRoots = new FileSystemNode(SRC_PATH).getNodes();
}
return srcRoots;
}
}
Hi,
If FileSystemNode is the class from richfaces-demo, then the answer is "no", it can't be used as-is for arbitrary path.