The Class of File, it can be seen as one document, also can be seen as list of documents.
File f = new File(String url);
f may be a document,also might be a directory.
Example : use recursive algorithmt to gain the all files in a absolute path.
public class Demo1 {
public static void main(String[] args) {
File f = new File("C:/Users/caich5/Desktop/Chris");
recussion(f);
}
public static void recussion(File file){
if(file.isDirectory()){
File[] files = file.listFiles();
for (File everyFile : files) {
if(everyFile.isFile()){
System.out.println(everyFile.getName());
}
else{
recussion(everyFile);
}
}
}
}
}