Class FileUtil

java.lang.Object
net.pl3x.map.core.util.FileUtil

public class FileUtil extends Object
  • Constructor Details

    • FileUtil

      public FileUtil()
  • Method Details

    • getTilesDir

      @NotNull public static @NotNull Path getTilesDir()
    • getWebDir

      @NotNull public static @NotNull Path getWebDir()
    • extractFile

      public static void extractFile(@NotNull @NotNull Class<?> clazz, @NotNull @NotNull String filename, @NotNull @NotNull Path outDir, boolean replace)
    • extractDir

      public static void extractDir(@NotNull @NotNull String sourceDir, @NotNull @NotNull Path outDir, boolean replace)
    • writeJson

      public static void writeJson(@NotNull @NotNull String str, @NotNull @NotNull Path file)
    • saveGzip

      public static void saveGzip(@NotNull @NotNull String json, @NotNull @NotNull Path file) throws IOException
      Throws:
      IOException
    • saveGzip

      public static void saveGzip(byte[] bytes, @NotNull @NotNull Path file) throws IOException
      Throws:
      IOException
    • readGzip

      public static void readGzip(@NotNull @NotNull Path file, @NotNull @NotNull ByteBuffer buffer) throws IOException
      Throws:
      IOException
    • readGzip

      public static String readGzip(@NotNull @NotNull Path file) throws IOException
      Throws:
      IOException
    • tmp

      public static Path tmp(Path file)
    • atomicMove

      public static void atomicMove(Path source, Path target) throws IOException
      Throws:
      IOException
    • mkDirs

      @NotNull public static @NotNull Path mkDirs(@NotNull @NotNull Path file) throws IOException
      Throws:
      IOException
    • createDirs

      public static void createDirs(@NotNull @NotNull Path dirPath)
    • deleteDirectory

      public static void deleteDirectory(@NotNull @NotNull Path dir) throws IOException
      Throws:
      IOException
    • regionPathsToPoints

      @NotNull public static @NotNull Collection<@NotNull Point> regionPathsToPoints(@NotNull @NotNull World world, @Nullable @Nullable Collection<@NotNull Path> paths, boolean ignoreTimestamp)