package com.zdsoft.testfile.code;
import java.io.File;
public class TestFile02 {
public static void main(String[] args) {
File file=new File("d:/");
TestFile02.showDir(file);
}
public static void showDir(File file){
File f[]=file.listFiles();
if(f!=null){
for(File ff:f){
if(ff.isDirectory()){
showDir(ff);
}else{
System.out.println(ff+"\n");
}
}
}
}
}
import java.io.File;
public class TestFile02 {
public static void main(String[] args) {
File file=new File("d:/");
TestFile02.showDir(file);
}
public static void showDir(File file){
File f[]=file.listFiles();
if(f!=null){
for(File ff:f){
if(ff.isDirectory()){
showDir(ff);
}else{
System.out.println(ff+"\n");
}
}
}
}
}