Class FileChecker
java.lang.Object
io.github.monsieurdoceo.filizer.shared.util.FileChecker
Utility methods for validating file names and checking file paths.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanChecks whether the specified file exists.static booleanhasValidName(String name) Checks whether a file name is valid.
-
Constructor Details
-
FileChecker
public FileChecker()Initializes the file checker.No custom initialization is required.
-
-
Method Details
-
hasValidName
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:
trueif the name is valid, otherwisefalse
-
exists
Checks whether the specified file exists.- Parameters:
path- the path to checks- Returns:
trueif the file exists, otherwisefalse
-