Class FileUtils

java.lang.Object
fr.codinbox.connector.commons.utils.FileUtils

public final class FileUtils extends Object
File-related utility methods.
  • Constructor Details

    • FileUtils

      public FileUtils()
  • Method Details

    • getExtension

      @Nullable public static @Nullable String getExtension(@NotNull @NotNull String filePath)
      Extracts the file extension from the given file path.

      The extension is the substring after the last '.' character. For example, "config.yml" returns "yml", and "path/to/file.tar.gz" returns "gz".

      Parameters:
      filePath - the file path to extract the extension from
      Returns:
      the file extension (without the dot), or null if no extension is present