Class FileChecker

java.lang.Object
io.github.monsieurdoceo.filizer.shared.util.FileChecker

public final class FileChecker extends Object
Utility methods for validating file names and checking file paths.
  • Constructor Details

    • FileChecker

      public FileChecker()
      Initializes the file checker.

      No custom initialization is required.

  • Method Details

    • hasValidName

      public static boolean hasValidName(String name)
      Checks whether a file name is valid.

      If the name is invalid, an error message is logged to the Bukkit logger.

      Parameters:
      name - the file name to validate
      Returns:
      true if the name is valid, otherwise false
    • exists

      public static boolean exists(Path path)
      Checks whether the specified file exists.
      Parameters:
      path - the path to checks
      Returns:
      true if the file exists, otherwise false