Package de.arstwo.twotil
Class FileUtil
java.lang.Object
de.arstwo.twotil.FileUtil
Various file-related utility functions.
-
Method Summary
Modifier and TypeMethodDescriptionfileOlderThan(long amountToSubtract, TemporalUnit unit) Creates a predicate for a functional context to test if a file is older than a given time frame.static booleanTries to delete a given path, catches potential IOExceptions, and returns true on success, false otherwise.static booleanunzipRootOnly(Path source, Path targetDir) Extracts the content of a zip file to a given target directory.
-
Method Details
-
fileOlderThan
Creates a predicate for a functional context to test if a file is older than a given time frame. -
unzipRootOnly
Extracts the content of a zip file to a given target directory.Ignores directories in the zip, only files in the root directory are extracted.
-
tryDeletePath
Tries to delete a given path, catches potential IOExceptions, and returns true on success, false otherwise.
-