public class GaoJiFor {
public static void main(String[] args) {
File f=new File("g:\\");
String [] names= f.list();
for(String name:names){
System.out.println(name);
}
}
public static void ListRootsDemo(){
File[] files=File.listRoots();
for(File f:files){
System.out.println(f);
}
}
}
|
|