/** * Extracts the filename of a complete filename path. * * @param pPath The full filename path. * @return the extracted filename. * @see File#getName * @see #getDirectoryname */ public static String getFilename(final String pPath) { return getFilename(pPath, File.separatorChar); }
/** * Gets the file (type) extension of the given file. * A file extension is the part of the filename, after the last occurence * of a period {@code '.'}. * If the filename contains no period, {@code null} is returned. * * @param pFileName the full filename with extension * @return the extension (type) of the file, or {@code null} */ public static String getExtension(final String pFileName) { return getExtension0(getFilename(pFileName)); }
/** * Gets the file name of the given file, without the extension (type). * A file extension is the part of the filename, after the last occurence * of a period {@code '.'}. * If the filename contains no period, the complete file name is returned * (same as {@code pFileName}, if the string contains no path elements). * * @param pFileName the full filename with extension * @return the base name of the file */ public static String getBasename(final String pFileName) { return getBasename0(getFilename(pFileName)); }
/** * Extracts the filename of a complete filename path. * * @param pPath The full filename path. * @return the extracted filename. * @see File#getName * @see #getDirectoryname */ public static String getFilename(final String pPath) { return getFilename(pPath, File.separatorChar); }
/** * Extracts the filename of a complete filename path. * * @param pPath The full filename path. * @return the extracted filename. * @see File#getName * @see #getDirectoryname */ public static String getFilename(final String pPath) { return getFilename(pPath, File.separatorChar); }
/** * Gets the file (type) extension of the given file. * A file extension is the part of the filename, after the last occurence * of a period {@code '.'}. * If the filename contains no period, {@code null} is returned. * * @param pFileName the full filename with extension * @return the extension (type) of the file, or {@code null} */ public static String getExtension(final String pFileName) { return getExtension0(getFilename(pFileName)); }
/** * Gets the file (type) extension of the given file. * A file extension is the part of the filename, after the last occurence * of a period {@code '.'}. * If the filename contains no period, {@code null} is returned. * * @param pFileName the full filename with extension * @return the extension (type) of the file, or {@code null} */ public static String getExtension(final String pFileName) { return getExtension0(getFilename(pFileName)); }
/** * Gets the file name of the given file, without the extension (type). * A file extension is the part of the filename, after the last occurence * of a period {@code '.'}. * If the filename contains no period, the complete file name is returned * (same as {@code pFileName}, if the string contains no path elements). * * @param pFileName the full filename with extension * @return the base name of the file */ public static String getBasename(final String pFileName) { return getBasename0(getFilename(pFileName)); }
/** * Gets the file name of the given file, without the extension (type). * A file extension is the part of the filename, after the last occurence * of a period {@code '.'}. * If the filename contains no period, the complete file name is returned * (same as {@code pFileName}, if the string contains no path elements). * * @param pFileName the full filename with extension * @return the base name of the file */ public static String getBasename(final String pFileName) { return getBasename0(getFilename(pFileName)); }