Remove the last few File usages

Barring one, given I've heard in hot code `Files.exists()` is slower than toFile().exists() if in the default `FileSystem`
This commit is contained in:
altrisi authored and gnembon committed 2022-08-28 18:34:39 +02:00
1 parent df240159ff
commit 2a4d678aa7
2 files changed
+6 -8

No files matched your search

@@ -80,7 +80,7 @@ import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.storage.CommandStorage;
import net.minecraft.world.level.storage.LevelResource;
import net.minecraft.world.phys.Vec3;
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.file.PathUtils;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
@@ -1076,7 +1076,7 @@ public class Auxiliary {
{
successful[0] = false;
try {
FileUtils.forceDelete(packFloder.toFile());
PathUtils.delete(packFloder);
} catch (IOException ignored) {
throw new InternalExpressionException("Failed to install a datapack and failed to clean up after it");
}