Class FileUtils
java.lang.Object
net.neoforged.moddevgradle.internal.utils.FileUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidatomicMove(Path source, Path destination) Atomically moves the given source file to the given destination file.static OutputStreamnewSafeFileOutputStream(Path destination) static voidwriteLinesSafe(Path destination, List<String> lines) static voidwriteStringSafe(Path destination, String content)
-
Method Details
-
writeStringSafe
- Throws:
IOException
-
writeLinesSafe
- Throws:
IOException
-
newSafeFileOutputStream
- Throws:
IOException
-
atomicMove
Atomically moves the given source file to the given destination file.- Parameters:
source- The source filedestination- The destination file- Throws:
IOException- If an I/O error occurs
-