Class FilePathParser

java.lang.Object
eu.svjatoslav.commons.file.FilePathParser

public class FilePathParser extends Object
  • Constructor Details

    • FilePathParser

      public FilePathParser()
  • Method Details

    • getFileExtension

      public static String getFileExtension(File file)
      Returns file extension.
      Parameters:
      file - File.
      Returns:
      File extension. Empty string if a file has no extension.
    • getFileExtension

      public static String getFileExtension(String fullFileName)
      Returns file extension.
      Parameters:
      fullFileName - Full file name.
      Returns:
      File extension. Empty string if a file has no extension.
    • getFileNameWithoutExtension

      public static String getFileNameWithoutExtension(File file)
      Returns file name without extension.
      Parameters:
      file - File.
      Returns:
      File name without extension.
    • getFileNameWithoutExtension

      public static String getFileNameWithoutExtension(String fullFileName)
      Returns file name without extension.
      Parameters:
      fullFileName - Full file name.
      Returns:
      File name without extension.
    • getFileSizeDescription

      public static String getFileSizeDescription(long fileSize)
      Returns file size description.
      Parameters:
      fileSize - File size in bytes.
      Returns:
      File size description.