Package net.minecraft

Class FileUtil

java.lang.Object
net.minecraft.FileUtil

public class FileUtil extends Object
  • Field Details

    • COPY_COUNTER_PATTERN

      private static final Pattern COPY_COUNTER_PATTERN
    • MAX_FILE_NAME

      private static final int MAX_FILE_NAME
      See Also:
    • RESERVED_WINDOWS_FILENAMES

      private static final Pattern RESERVED_WINDOWS_FILENAMES
    • RESERVED_WINDOWS_FILENAMES_NEOFORGE

      private static final Pattern RESERVED_WINDOWS_FILENAMES_NEOFORGE
    • STRICT_PATH_SEGMENT_CHECK

      private static final Pattern STRICT_PATH_SEGMENT_CHECK
  • Constructor Details

    • FileUtil

      public FileUtil()
  • Method Details

    • sanitizeName

      public static String sanitizeName(String name)
    • findAvailableName

      public static String findAvailableName(Path dirPath, String fileName, String fileFormat) throws IOException
      Throws:
      IOException
    • isPathNormalized

      public static boolean isPathNormalized(Path p_path)
    • isPathPortable

      public static boolean isPathPortable(Path p_path)
    • createPathToResource

      public static Path createPathToResource(Path dirPath, String locationPath, String fileFormat)
    • getFullResourcePath

      public static String getFullResourcePath(String path)
    • normalizeResourcePath

      public static String normalizeResourcePath(String path)
    • decomposePath

      public static com.mojang.serialization.DataResult<List<String>> decomposePath(String path)
    • resolvePath

      public static Path resolvePath(Path path, List<String> subdirectories)
    • isValidStrictPathSegment

      public static boolean isValidStrictPathSegment(String segment)
    • validatePath

      public static void validatePath(String... elements)
    • createDirectoriesSafe

      public static void createDirectoriesSafe(Path path) throws IOException
      Throws:
      IOException