| Modifier and Type | Method and Description |
|---|---|
static <C extends Closeable> |
close(C closable) |
static <C extends AutoCloseable> |
close(C closable) |
static <C extends Closeable> |
close(C closable,
Throwable suppressed) |
static <C extends AutoCloseable> |
close(C closable,
Throwable suppressed) |
static boolean |
delete(Path path) |
static <P extends Path> |
ensureDirectory(P directory) |
static <P extends Path> |
ensureDirectoryAndFile(P file) |
static <P extends Path> |
ensureFile(P file) |
static <P extends Path> |
ensureWriteableFile(P file) |
static boolean |
exists(Path path) |
static boolean |
hasNoFiles(Path directory) |
static boolean |
isDirectory(Path path) |
static <C extends Consumer<? super Path>> |
iterateEntries(Path directory,
C logic)
Warning: this (because of using Files.newDirectoryStream) does some weird file opening/locking stuff.
|
static <C extends Consumer<? super Path>> |
iterateEntries(Path directory,
C logic,
Predicate<? super Path> selector)
Warning: this (because of using Files.newDirectoryStream) does some weird file opening/locking stuff.
|
static long |
lastModified(Path file) |
static Path[] |
listEntries(Path directory) |
static <C extends Consumer<? super Path>> |
listEntries(Path directory,
C target) |
static <C extends Consumer<? super Path>> |
listEntries(Path directory,
C target,
Predicate<? super Path> selector) |
static Path[] |
listEntries(Path directory,
Predicate<? super Path> selector) |
static void |
move(Path sourceFile,
Path targetFile) |
static long |
size(FileChannel fileChannel) |
static long |
size(Path file) |
public static final <C extends Closeable> C close(C closable) throws IORuntimeException
IORuntimeExceptionpublic static final <C extends AutoCloseable> C close(C closable) throws RuntimeException
RuntimeExceptionpublic static final <C extends Closeable> C close(C closable, Throwable suppressed) throws IORuntimeException
IORuntimeExceptionpublic static final <C extends AutoCloseable> C close(C closable, Throwable suppressed) throws RuntimeException
RuntimeExceptionpublic static final long size(FileChannel fileChannel) throws IORuntimeException
IORuntimeExceptionpublic static boolean isDirectory(Path path) throws IORuntimeException
IORuntimeExceptionpublic static final boolean exists(Path path) throws IORuntimeException
IORuntimeExceptionpublic static final long size(Path file) throws IORuntimeException
IORuntimeExceptionpublic static final boolean delete(Path path) throws IORuntimeException
IORuntimeExceptionpublic static final Path[] listEntries(Path directory) throws IORuntimeException
IORuntimeExceptionpublic static Path[] listEntries(Path directory, Predicate<? super Path> selector) throws IORuntimeException
IORuntimeExceptionpublic static final <C extends Consumer<? super Path>> C listEntries(Path directory, C target) throws IORuntimeException
IORuntimeExceptionpublic static final <C extends Consumer<? super Path>> C listEntries(Path directory, C target, Predicate<? super Path> selector) throws IORuntimeException
IORuntimeExceptionpublic static <C extends Consumer<? super Path>> C iterateEntries(Path directory, C logic) throws IORuntimeException
Also see: https://stackoverflow.com/questions/48311252/a-bit-strange-behaviour-of-files-delete-and-files-deleteifexists
C - the consumer typedirectory - the source directorylogic - the itaration logicIORuntimeException - when an IO error occurspublic static <C extends Consumer<? super Path>> C iterateEntries(Path directory, C logic, Predicate<? super Path> selector) throws IORuntimeException
Also see: https://stackoverflow.com/questions/48311252/a-bit-strange-behaviour-of-files-delete-and-files-deleteifexists
C - the consumer typedirectory - the source directorylogic - the itaration logicselector - filter predicateIORuntimeException - when an IO error occurspublic static final boolean hasNoFiles(Path directory) throws IORuntimeException
IORuntimeExceptionpublic static final long lastModified(Path file) throws IORuntimeException
IORuntimeExceptionpublic static final <P extends Path> P ensureDirectory(P directory) throws IORuntimeException
IORuntimeExceptionpublic static final <P extends Path> P ensureDirectoryAndFile(P file) throws IORuntimeException
IORuntimeExceptionpublic static final <P extends Path> P ensureFile(P file) throws IORuntimeException
IORuntimeExceptionpublic static final <P extends Path> P ensureWriteableFile(P file) throws IORuntimeException
IORuntimeExceptionpublic static void move(Path sourceFile, Path targetFile) throws IORuntimeException, RuntimeException
IORuntimeExceptionRuntimeExceptionCopyright © 2022 MicroStream Software. All rights reserved.