Similar to Files, but for ExtendedFileSystem.
More...
|
| static Path | copyOnWrite (Path source, Path target, CopyOption... options) throws IOException |
| | Copies the source file to the target file.
|
| static Path | mount (Path source, Path target, MountOption... options) throws IOException |
| | Attempts to mount the source file onto the target file, such that all reads and writes to the target file actually read and write the source file.
|
| static boolean | isMountedFile (Path file) |
| static boolean | isCopyOnWrite (Path file) |
| static Path | readMountTarget (Path file) throws IOException |
| | Reads the target of a mounted file, if it was created by mount(Path, Path, MountOption...).
|
Similar to Files, but for ExtendedFileSystem.
Unlike Files, most operations can take Paths from any file system.
◆ copyOnWrite()
| Path org.quiltmc.loader.api.ExtendedFiles.copyOnWrite |
( |
Path | source, |
|
|
Path | target, |
|
|
CopyOption... | options ) throws IOException |
|
inlinestatic |
Copies the source file to the target file.
If the source file system is read-only then the target file may become a link to the source file, which is fully copied when it is modified.
This method is a safe alternative to mount(Path, Path, MountOption...), when passing them MountOption#COPY_ON_WRITE, in the sense that it will copy the file if the filesystem doesn't support mounts.
◆ isCopyOnWrite()
| boolean org.quiltmc.loader.api.ExtendedFiles.isCopyOnWrite |
( |
Path | file | ) |
|
|
inlinestatic |
◆ isMountedFile()
| boolean org.quiltmc.loader.api.ExtendedFiles.isMountedFile |
( |
Path | file | ) |
|
|
inlinestatic |
◆ mount()
| Path org.quiltmc.loader.api.ExtendedFiles.mount |
( |
Path | source, |
|
|
Path | target, |
|
|
MountOption... | options ) throws IOException |
|
inlinestatic |
Attempts to mount the source file onto the target file, such that all reads and writes to the target file actually read and write the source file.
(The exact behaviour depends on the options given).
This is similar to Files#createSymbolicLink(Path, Path, java.nio.file.attribute.FileAttribute...), but the source file and target file don't need to be on the same filesystem.
This does not support mounting folders.
- Exceptions
-
| UnsupportedOperationException | if the filesystem doesn't support this operation. |
| IOException | if anything goes wrong while mounting the file. |
◆ readMountTarget()
| Path org.quiltmc.loader.api.ExtendedFiles.readMountTarget |
( |
Path | file | ) |
throws IOException |
|
inlinestatic |
The documentation for this class was generated from the following file:
- src/main/java/org/quiltmc/loader/api/ExtendedFiles.java