public static void deleteFile(String completePathFile) throws IOException {
try {
File filetoDelete = new File(completePathFile);
if (filetoDelete.exists()) {
if (!filetoDelete.delete())
throw new IOException(
"ERROR FILE NOT DELETED !! pathFile : "
+ filetoDelete.getAbsolutePath());
}
} catch (IOException ex) {
throw new IOException("Error in deleting file");
}
}
Saturday, December 29, 2007
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment