java.lang.Object
org.yamcs.utils.FileUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voiddeleteContents(Path directory) static voiddeleteRecursively(Path dirToRemove) static voidstatic voidwriteAtomic(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
-
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
-