Package org.yamcs.utils
Class FileUtils
java.lang.Object
org.yamcs.utils.FileUtils
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
copyRecursively
(Path source, Path target, CopyOption... options) static void
deleteContents
(Path directory) static void
deleteRecursively
(Path dirToRemove) static void
static void
writeAtomic
(Path file, byte[] bytes) Writes bytes to a file in two phases via a temporary file in the same folder.
-
Constructor Details
-
FileUtils
public FileUtils()
-
-
Method Details
-
copyRecursively
public static void copyRecursively(Path source, Path target, CopyOption... options) throws IOException - Throws:
IOException
-
deleteRecursively
- Throws:
IOException
-
deleteRecursivelyIfExists
- Throws:
IOException
-
deleteContents
- Throws:
IOException
-
writeAtomic
Writes bytes to a file in two phases via a temporary file in the same folder. This will either succeed or fail and leave the original file in place.- Throws:
IOException
-