Class FileUtil
java.lang.Object
net.minecraft.util.FileUtil
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static booleancontainsAllowedCharactersOnly(String segment) static voiddecomposePath(String path) static StringfindAvailableName(Path baseDir, String baseName, String suffix) static StringgetFullResourcePath(String filename) static booleanisPathPartPortable(String name) static booleanisPathPortable(Path path) static booleanisValidPathSegment(String segment) static StringnormalizeResourcePath(String filename) static PathresolvePath(Path root, List<String> segments) static StringsanitizeName(String baseName) static voidvalidatePath(String... path)
-
Field Details
-
COPY_COUNTER_PATTERN
-
MAX_FILE_NAME
private static final int MAX_FILE_NAME- See Also:
-
RESERVED_WINDOWS_FILENAMES
-
RESERVED_WINDOWS_FILENAMES_NEOFORGE
-
STRICT_PATH_SEGMENT_CHECK
-
-
Constructor Details
-
FileUtil
public FileUtil()
-
-
Method Details
-
sanitizeName
-
findAvailableName
public static String findAvailableName(Path baseDir, String baseName, String suffix) throws IOException - Throws:
IOException
-
isPathPortable
-
isPathPartPortable
-
getFullResourcePath
-
normalizeResourcePath
-
decomposePath
-
resolvePath
-
containsAllowedCharactersOnly
-
isValidPathSegment
-
validatePath
-
createDirectoriesSafe
- Throws:
IOException
-