private static void delete(File file) { try { sirius.kernel.commons.Files.delete(file.toPath()); } catch (IOException e) { Exceptions.handle(Storage.LOG, e); } }
/** * Returns the filename without its file extension. * <p> * The file extension is everything after the last <tt>.</tt> in the filename. * * @param path the path to a file to parse * @return the filename without extension or <tt>null</tt> if the given path is empty, <tt>null</tt> or does not * have a filename (ends with a sepratator). */ @Nullable public static String getFilenameWithoutExtension(@Nullable String path) { return Strings.splitAtLast(getFilenameAndExtension(path), ".").getFirst(); }