胡53

package com.rjtx;

import java.io.File;
import java.util.Arrays;

public class MainFile {

public static void main(String[] args) {
// TODO Auto-generated method stub

System.out.println("hdw ");
ScanFolder("G:\\2345");
}



public static void ScanFolder(String folder)
{
//int length = folder.length();
File file = new File(folder);
if(null == file)
{
return;
}
File[] fList = file.listFiles();



/*byte[] b = new byte[length];
Arrays.fill(b, (byte)32);
String s = new String(b);
*/

for(int i =0; i< fList.length;i++)
{
String path = fList[i].getPath();
//String fName = fList[i].getName();



System.out.println(path);
if(fList[i].isDirectory())
{
ScanFolder(path);
}
/*
if(fList[i].isDirectory())
{
System.out.println(path);
ScanFolder(path);
}
else
{

System.out.println(pat);
}
*/

}




}

}

posted on 2017-05-03 22:55  shyasher  阅读(98)  评论(0编辑  收藏  举报

导航