From c28f436f54b0f355d02bacadecf82d5f7effe80e Mon Sep 17 00:00:00 2001 From: roman10 Date: Mon, 5 Dec 2011 12:37:45 +0800 Subject: [PATCH] add missing files --- src/feipeng/andzop/utils/FileUtilsStatic.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/feipeng/andzop/utils/FileUtilsStatic.java diff --git a/src/feipeng/andzop/utils/FileUtilsStatic.java b/src/feipeng/andzop/utils/FileUtilsStatic.java new file mode 100644 index 0000000..84b61a1 --- /dev/null +++ b/src/feipeng/andzop/utils/FileUtilsStatic.java @@ -0,0 +1,19 @@ +package feipeng.andzop.utils; + +import java.io.File; + +public class FileUtilsStatic { + public static void deleteAllDepFiles(String dir) { + try { + File[] tfiles = new File(dir).listFiles(); + for (File aFile : tfiles) { + if (aFile.getName().endsWith(".txt")) { + aFile.delete(); + } + } + } catch (Exception e) { + //dir not exists or cannot delete the file + e.printStackTrace(); + } + } +}