|
Quilt Loader 1
|
A FileSystem which may support additional features, beyond those which normal file systems support.
More...
Public Member Functions | |
| default Path | copyOnWrite (Path source, Path target, CopyOption... options) throws IOException |
| Copies the source file to the target file. | |
| default Path | mount (Path source, Path target, MountOption... options) throws IOException |
| Mounts the given source file on the target file, such that all reads and writes will actually read and write the source file. | |
| default boolean | isMountedFile (Path file) |
| default boolean | isCopyOnWrite (Path file) |
| default Path | readMountTarget (Path file) throws IOException |
Reads the target of a mounted file, if it was created by mount(Path, Path, MountOption...). | |
| Public Member Functions inherited from org.quiltmc.loader.api.FasterFileSystem | |
| default Path | createFile (Path path, FileAttribute<?>... attrs) throws IOException |
Either the same speed as, or slightly faster than Files#createFile(Path, FileAttribute...). | |
| default Path | createDirectories (Path dir, FileAttribute<?>... attrs) throws IOException |
| default Path | copy (Path source, Path target, CopyOption... options) throws IOException |
| default boolean | isSymbolicLink (Path path) |
| default boolean | isDirectory (Path path, LinkOption... options) |
| default boolean | isRegularFile (Path path, LinkOption[] options) |
| default boolean | exists (Path path, LinkOption... options) |
Either the same speed as, or faster than Files#exists(Path, LinkOption...). | |
| default boolean | notExists (Path path, LinkOption... options) |
Either the same speed as, or faster than Files#notExists(Path, LinkOption...). | |
| default boolean | isReadable (Path path) |
| default boolean | isWritable (Path path) |
| default boolean | isExecutable (Path path) |
| default Stream< Path > | list (Path dir) throws IOException |
| default Collection<? extends Path > | getChildren (Path dir) throws IOException |
A FileSystem which may support additional features, beyond those which normal file systems support.
Similar to regular file systems, you should generally use ExtendedFiles to perform these operations.
|
inline |
Copies the source file to the target file.
If the source file system is read-only then this will mount(Path, Path, MountOption...) the given file with MountOption#COPY_ON_WRITE.
| source | A Path, which might not be in this FileSystem. |
| target | A Path which must be from this ExtendedFileSystem |
Implemented in org.quiltmc.loader.impl.filesystem.QuiltUnifiedFileSystem.
|
inline |
mount(Path, Path, MountOption...) with MountOption#COPY_ON_WRITE, and the file has not been modified since it was copied. Implemented in org.quiltmc.loader.impl.filesystem.QuiltUnifiedFileSystem.
|
inline |
mount(Path, Path, MountOption...). Implemented in org.quiltmc.loader.impl.filesystem.QuiltUnifiedFileSystem, and org.quiltmc.loader.impl.filesystem.QuiltZipFileSystem.
|
inline |
Mounts the given source file on the target file, such that all reads and writes will 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...) except the source and target files don't need to be on the same filesystem.
Note that this does not support mounting folders.
| source | A path from any FileSystem. |
| target | A path from this ExtendedFileSystem. |
| options | Options which control how the file is mounted. |
| UnsupportedOperationException | if this filesystem doesn't support file mounts. |
Implemented in org.quiltmc.loader.impl.filesystem.QuiltUnifiedFileSystem.
|
inline |
Reads the target of a mounted file, if it was created by mount(Path, Path, MountOption...).
| NotLinkException | if the given file is not a isMountedFile(Path). |
| UnsupportedOperationException | if this filesystem doesn't support file mounts. |
Implemented in org.quiltmc.loader.impl.filesystem.QuiltUnifiedFileSystem, and org.quiltmc.loader.impl.filesystem.QuiltZipFileSystem.