/** * Null safe method to unconditionally attempt to delete <code>filename</code> without throwing an exception. If <code>filename</code> is a directory, delete it and all * sub-directories. */ public static final boolean deleteFileQuietly(String filename) { File file = getFileQuietly(filename); return FileUtils.deleteQuietly(file); }
public static final String getFilename(String location) { if (location == null) { return null; } if (isExistingFile(location)) { return getFileQuietly(location).getName(); } else { Resource resource = getResource(location); return resource.getFilename(); } }