/**
* 删除某个文件夹下的所有文件
* @param fileName
*/
public void deleteOldFile()
{
//clientFilePath是某个目录,如c:/test
File file = new File(clientFilePath);
if (!file.exists())
{
file.mkdir();
}
File files = new File(clientFilePath);
if (files.isDirectory())
{
String[] fileList = files.list();
for (int i = 0; i < fileList.length; i++)
{
File delFile = new File(clientFilePath + "/" + fileList[i]);
delFile.delete();
}
}
}