Quilt Loader 1
Loading...
Searching...
No Matches
org.quiltmc.loader.api.CachedFileSystem Interface Reference

Implemented by quilt-loaders FileSystem which shouldn't change after a certain point. More...

Inheritance diagram for org.quiltmc.loader.api.CachedFileSystem:
org.quiltmc.loader.api.FasterFileSystem org.quiltmc.loader.impl.filesystem.QuiltJoinedFileSystem org.quiltmc.loader.impl.filesystem.QuiltMemoryFileSystem org.quiltmc.loader.impl.filesystem.ReadOnlyFileSystem org.quiltmc.loader.impl.filesystem.QuiltZipFileSystem

Public Member Functions

boolean isPermanentlyReadOnly ()
default boolean exists (Path path, LinkOption... options)
 Either the same speed as, or faster than Files#exists(Path, LinkOption...).
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 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

Static Public Member Functions

static boolean doesExist (Path path, LinkOption... options)
 Kept for backwards compatibility only.

Detailed Description

Implemented by quilt-loaders FileSystem which shouldn't change after a certain point.

This applies both to filesystems which are stored in memory, and filesystems which are loaded from files on-disk. Filesystems which are backed by folders (such as a development environment) will always return false from isPermanentlyReadOnly().

You need to call isPermanentlyReadOnly() to check if that point has been reached.

Member Function Documentation

◆ doesExist()

boolean org.quiltmc.loader.api.CachedFileSystem.doesExist ( Path path,
LinkOption... options )
inlinestatic

Kept for backwards compatibility only.

Please use FasterFiles#exists(Path, LinkOption...) instead!

◆ exists()

default boolean org.quiltmc.loader.api.CachedFileSystem.exists ( Path path,
LinkOption... options )
inline

◆ isPermanentlyReadOnly()

boolean org.quiltmc.loader.api.CachedFileSystem.isPermanentlyReadOnly ( )
Returns
True if this FileSystem won't accept file creation, deletion, or modification, and the underlying files are not expected to be changed either.

IMPORTANT: If this method ever returns true, then it will always return true in the future! (The inverse doesn't hold true - a writable filesystem may become read-only after a certain point).

Implemented in org.quiltmc.loader.impl.filesystem.QuiltJoinedFileSystem, and org.quiltmc.loader.impl.filesystem.ReadOnlyFileSystem.


The documentation for this interface was generated from the following file:
  • src/main/java/org/quiltmc/loader/api/CachedFileSystem.java