Package one.microstream.io
Class XIO.unchecked
java.lang.Object
one.microstream.io.XIO.unchecked
- Enclosing class:
- XIO
public static final class XIO.unchecked extends Object
-
Constructor Summary
Constructors Constructor Description unchecked()
-
Method Summary
Modifier and Type Method Description static <C extends Closeable>
Cclose(C closable)
static <C extends Closeable>
Cclose(C closable, Throwable suppressed)
static boolean
delete(Path path)
static <P extends Path>
PensureDirectory(P directory)
static <P extends Path>
PensureDirectoryAndFile(P file)
static <P extends Path>
PensureFile(P file)
static <P extends Path>
PensureWriteableFile(P file)
static boolean
exists(Path path)
static boolean
hasNoFiles(Path directory)
static boolean
isDirectory(Path path)
static <C extends Consumer<? super Path>>
CiterateEntries(Path directory, C logic)
Warning: this (because of using Files.newDirectoryStream) does some weird file opening/locking stuff.static <C extends Consumer<? super Path>>
CiterateEntries(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>>
ClistEntries(Path directory, C target)
static <C extends Consumer<? super Path>>
ClistEntries(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)
-
Constructor Details
-
unchecked
public unchecked()
-
-
Method Details
-
close
- Throws:
IORuntimeException
-
close
- Throws:
RuntimeException
-
close
public static final <C extends Closeable> C close(C closable, Throwable suppressed) throws IORuntimeException- Throws:
IORuntimeException
-
close
public static final <C extends AutoCloseable> C close(C closable, Throwable suppressed) throws RuntimeException- Throws:
RuntimeException
-
size
- Throws:
IORuntimeException
-
isDirectory
- Throws:
IORuntimeException
-
exists
- Throws:
IORuntimeException
-
size
- Throws:
IORuntimeException
-
delete
- Throws:
IORuntimeException
-
listEntries
- Throws:
IORuntimeException
-
listEntries
public static Path[] listEntries(Path directory, Predicate<? super Path> selector) throws IORuntimeException- Throws:
IORuntimeException
-
listEntries
public static final <C extends Consumer<? super Path>> C listEntries(Path directory, C target) throws IORuntimeException- Throws:
IORuntimeException
-
listEntries
public static final <C extends Consumer<? super Path>> C listEntries(Path directory, C target, Predicate<? super Path> selector) throws IORuntimeException- Throws:
IORuntimeException
-
iterateEntries
public static <C extends Consumer<? super Path>> C iterateEntries(Path directory, C logic) throws IORuntimeExceptionWarning: this (because of using Files.newDirectoryStream) does some weird file opening/locking stuff.Also see: https://stackoverflow.com/questions/48311252/a-bit-strange-behaviour-of-files-delete-and-files-deleteifexists
- Type Parameters:
C
-- Parameters:
directory
-logic
-- Returns:
- Throws:
IORuntimeException
-
iterateEntries
public static <C extends Consumer<? super Path>> C iterateEntries(Path directory, C logic, Predicate<? super Path> selector) throws IORuntimeExceptionWarning: this (because of using Files.newDirectoryStream) does some weird file opening/locking stuff.Also see: https://stackoverflow.com/questions/48311252/a-bit-strange-behaviour-of-files-delete-and-files-deleteifexists
- Type Parameters:
C
-- Parameters:
directory
-logic
-selector
-- Returns:
- Throws:
IORuntimeException
-
hasNoFiles
- Throws:
IORuntimeException
-
lastModified
- Throws:
IORuntimeException
-
ensureDirectory
- Throws:
IORuntimeException
-
ensureDirectoryAndFile
- Throws:
IORuntimeException
-
ensureFile
- Throws:
IORuntimeException
-
ensureWriteableFile
- Throws:
IORuntimeException
-
move
public static void move(Path sourceFile, Path targetFile) throws IORuntimeException, RuntimeException- Throws:
IORuntimeException
RuntimeException
-