yarn/mappings/net/minecraft/util/FileNameUtil.mapping

52 lines
2.5 KiB
Plaintext
Raw Normal View History

2019-06-28 17:55:20 -04:00
CLASS net/minecraft/class_4239 net/minecraft/util/FileNameUtil
COMMENT A class holding file name-related utility methods.
2019-06-28 17:55:20 -04:00
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
FIELD field_40712 VALID_FILE_NAME Ljava/util/regex/Pattern;
2019-06-28 17:55:20 -04:00
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
2019-04-16 10:16:45 -04:00
ARG 0 path
ARG 1 name
ARG 2 extension
2019-06-28 17:55:20 -04:00
METHOD method_20200 isNormal (Ljava/nio/file/Path;)Z
COMMENT {@return whether {@code path} is already normalized}
2019-06-28 17:55:20 -04:00
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
METHOD method_46344 getPath (Ljava/nio/file/Path;Ljava/util/List;)Ljava/nio/file/Path;
ARG 0 root
ARG 1 paths
METHOD method_46345 isPathValid ([Ljava/lang/String;)V
ARG 0 paths
METHOD method_46346 split (Ljava/lang/String;)Lcom/mojang/serialization/DataResult;
ARG 0 path
METHOD method_46347 isFileNameValid (Ljava/lang/String;)Z
ARG 0 name