Recursive directory times calendar
Abstract: recursive directory times calendar
Content: This is my own calendar times to write a directory of categories, the use of the recursive method, if we who need to use it on lightly!
Import java.io. *;
Import java.util .*;
(Public class ListDirectory
Public static int listDir (String dir, ArrayList listFile) throws IOException (
Int result = 0;
File file = new File (dir);
File fileList [];
If (! File.isDirectory ()) (
Result = 1;
Else ()
FileList = file.listFiles ();
For (int i = 0; i
ListDir (fileList [i]. GetPath (), listFile);
Else ()
ListFile.add (fileList [i]. GetPath ());
)
)
)
Return result;
)
) Java, java, J2SE, j2se, J2EE, j2ee, J2ME, j2me, ejb, ejb3, JBOSS, jboss, spring, hibernate, jdo, struts, webwork, ajax, AJAX, mysql, MySQL, Oracle, Weblogic, Websphere, scjp , scjd This is me?
↑ Back
Tags: Calendar






