public static void deleteSrcPicture(String s_path) {
try{
File s_file= new File(s_path.toString());
if (!s_file.exists()) {
System.out.println("s_file is not a directory.");
return;
}
File[] files= s_file.listFiles();
for (int i= 0; i<files.length; i++) {
//System.out.println( files[i].getName());
logger.info( i + "==" + files[i].getName() );
String fileName = files[i].getName();
/******************************************************************************
* if directory,circulate
*****************************************************************************************/
if (files[i].isDirectory()) {
StringBuffer s_subPath=new StringBuffer(s_path.toString());
s_subPath.append(System.getProperty("file.separator"));
s_subPath.append(files[i].getName());
deleteSrcPicture(s_subPath.toString());
} else if (files[i].isFile()) {
//处理你需要的逻辑
}
} catch (Exception ex) {
logger.info(ex );
}
09-05