Package net.pl3x.map.core.util
Class FileUtil
java.lang.Object
net.pl3x.map.core.util.FileUtil
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
atomicMove
(Path source, Path target) static void
createDirs
(@NotNull Path dirPath) static void
deleteDirectory
(@NotNull Path dir) static void
extractDir
(@NotNull String sourceDir, @NotNull Path outDir, boolean replace) static void
extractFile
(@NotNull Class<?> clazz, @NotNull String filename, @NotNull Path outDir, boolean replace) static @NotNull Path
static @NotNull Path
static @NotNull Path
static String
static void
readGzip
(@NotNull Path file, @NotNull ByteBuffer buffer) static @NotNull Collection
<@NotNull Point> regionPathsToPoints
(@NotNull World world, @Nullable Collection<@NotNull Path> paths, boolean ignoreTimestamp) static void
static void
static Path
static void
-
Constructor Details
-
FileUtil
public FileUtil()
-
-
Method Details
-
getTilesDir
-
getWebDir
-
extractFile
-
extractDir
-
writeJson
-
saveGzip
public static void saveGzip(@NotNull @NotNull String json, @NotNull @NotNull Path file) throws IOException - Throws:
IOException
-
saveGzip
- Throws:
IOException
-
readGzip
public static void readGzip(@NotNull @NotNull Path file, @NotNull @NotNull ByteBuffer buffer) throws IOException - Throws:
IOException
-
readGzip
- Throws:
IOException
-
tmp
-
atomicMove
- Throws:
IOException
-
mkDirs
- Throws:
IOException
-
createDirs
-
deleteDirectory
- Throws:
IOException
-
regionPathsToPoints
@NotNull public static @NotNull Collection<@NotNull Point> regionPathsToPoints(@NotNull @NotNull World world, @Nullable @Nullable Collection<@NotNull Path> paths, boolean ignoreTimestamp)
-