1 Reply Latest reply on Mar 30, 2010 9:38 AM by Nick Belaevski

    Tree of filesystem list

    jsf geeks Master

      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;
          }
      }