Hi,everyone,i have trouble with following code,which is for listing all file in 
a filepath

        public static ArrayList<File> ListFile(File filepath) {
                ArrayList<File> fileList = null;
        File[] file = filepath.listFiles();
        for (File f:file) {
            if(f.isFile())
                fileList.add(f);
            if (f.isDirectory())
                ListFile(f);
        }
        return fileList;
        }

Thanks !


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Java EE (J2EE) Programming with Passion!" group.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to
java-ee-j2ee-programming-with-passion-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to