package file1;
import java.io.*;
public class FileDemo {
public static void main(String[] args) {
// TODO Auto-generated method stub
File f=new File("e:\\");
show(f);
}
public static void show(File fl)
{
File[] fls=fl.listFiles();
for(int i=0;i<fls.length;i++)
if(fls[i].isDirectory())
show(fls[i]);
else
System.out.println(fls[i]);
}
}
|
|