public class Test{
public static void main(String [] args)
{
File f=new File("d:");
File [] fl=f.listFiles();
show(f1);
}
public static void show(File [] f1)
{
for(File f:fl)
{
if(f.isDirectory())
{
File [] f2=f.listFiles();
show(f2);
}
else
{
System.out.println(f);
}
}
}
}
时间: 2024-10-13 09:30:01