mirror of https://github.com/FabricMC/yarn.git
42 lines
2.1 KiB
Plaintext
42 lines
2.1 KiB
Plaintext
CLASS net/minecraft/class_4239 net/minecraft/util/FileNameUtil
|
|
COMMENT A class holding file name-related utility methods.
|
|
FIELD field_18955 RESERVED_WINDOWS_NAMES Ljava/util/regex/Pattern;
|
|
FIELD field_18956 FILE_NAME_WITH_COUNT Ljava/util/regex/Pattern;
|
|
FIELD field_33384 MAX_NAME_LENGTH I
|
|
METHOD method_19773 getNextUniqueName (Ljava/nio/file/Path;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
|
|
COMMENT {@return a filename, prefixed with {@code name}, that does not currently
|
|
COMMENT exist inside {@code path}}
|
|
COMMENT
|
|
COMMENT @implNote This strips any illegal characters from {@code name}, then
|
|
COMMENT attempts to make a directory with the name and the extension. If this succeeds,
|
|
COMMENT the directory is deleted and the name with the extension is returned. If not, it
|
|
COMMENT appends {@code (1)} to the name and tries again until it succeeds.
|
|
COMMENT
|
|
COMMENT @throws IOException if creating the temporary directory fails, e.g. due to {@code path}
|
|
COMMENT not being a directory
|
|
ARG 0 path
|
|
ARG 1 name
|
|
ARG 2 extension
|
|
METHOD method_20200 isNormal (Ljava/nio/file/Path;)Z
|
|
COMMENT {@return whether {@code path} is already normalized}
|
|
ARG 0 path
|
|
METHOD method_20201 isAllowedName (Ljava/nio/file/Path;)Z
|
|
COMMENT {@return whether {@code path} does not contain reserved Windows file names}
|
|
COMMENT
|
|
COMMENT @apiNote This returns {@code false} for reserved names regardless of whether the platform
|
|
COMMENT the game is running is actually Windows. Note that this does not check for
|
|
COMMENT illegal characters or file permissions.
|
|
ARG 0 path
|
|
METHOD method_20202 getResourcePath (Ljava/nio/file/Path;Ljava/lang/String;Ljava/lang/String;)Ljava/nio/file/Path;
|
|
ARG 0 path
|
|
ARG 1 resourceName
|
|
ARG 2 extension
|
|
METHOD method_34675 getPosixFullPath (Ljava/lang/String;)Ljava/lang/String;
|
|
COMMENT {@return the full path of {@code path} with directory separator normalized
|
|
COMMENT to {@code /}}
|
|
ARG 0 path
|
|
METHOD method_34676 normalizeToPosix (Ljava/lang/String;)Ljava/lang/String;
|
|
COMMENT {@return the normalized path of {@code path} with directory separator normalized
|
|
COMMENT to {@code /}}
|
|
ARG 0 path
|