首页 > 代码库 > 胡53

胡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);
}
*/

}




}

}

胡53