Package org.kingdoms.utils
Class FSUtil
java.lang.Object
org.kingdoms.utils.FSUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic intcountEntriesOf(Path folder) There's no better way in Java.static intcountEntriesOf(Path folder, Predicate<Path> filter) static voiddeleteAllFileTypes(Path folder, String type) static voiddeleteFolder(Path folder) Deletes a folder entirely if it exists.static PathfindSlotForCounterFile(Path folder, String prefix, String extension) static booleanisFolderEmpty(Path folder) static voidtransfer(InputStream in, OutputStream out)
-
Constructor Details
-
FSUtil
public FSUtil()
-
-
Method Details
-
countEntriesOf
There's no better way in Java. We're bound by this stupid encapsulation of Java. -
countEntriesOf
-
findSlotForCounterFile
-
isFolderEmpty
-
deleteFolder
Deletes a folder entirely if it exists. -
deleteAllFileTypes
-
transfer
- Throws:
IOException
-