递归遍历文件

   
public static void getfile(file file){		if(file == null){			return;		}		if(file.isdirectory())		{			string[] files = file.list();			for(int i=0; i<files.length;i++)			{				getfile(new file(file,files[i]));			}		}		else		{			if(file.getabsolutepath().endswith(".html")					&amp;&amp;file.getname().matches("[0-9]*[0-9][0-9].html"))			{system.out.println(file);				count++;			}		}	}
 

你可能感兴趣的:(java,工作)