java.lang.Object
com.github.siroshun09.configapi.core.util.FileUtils

public final class FileUtils extends Object
Utility class used for internal processing of this library
  • Method Details

    • createFileIfNotExists

      public static Path createFileIfNotExists(@NotNull @NotNull Path path) throws IOException
      If the file does not exist in the specified path, creates its parent directory and it.
      Parameters:
      path - file path
      Returns:
      given file path
      Throws:
      IOException - if an I/O error occurs
      NullPointerException - if the path is null
    • createDirectoriesIfNotExists

      public static Path createDirectoriesIfNotExists(@NotNull @NotNull Path path) throws IOException
      If the directory does not exist in the specified path, creates its parent directory and it.
      Parameters:
      path - directory path
      Returns:
      given file path
      Throws:
      IOException - if an I/O error occurs
      NullPointerException - if the path is null