OkioBackedFileSystem

Base class for the public FileSystem entry points (DiskFileSystem, VirtualFileSystem), which are always root file systems and delegate their behavior to the internal OkioFileSystem engine, while acting themselves as the lineage root of their branches.

Inheritors

Properties

Link copied to clipboard
open val isRoot: Boolean

Whether this file system is the root one.

Link copied to clipboard
override val root: FileSystem?

The root file system that originated this one via branch calls. If null, this file system is the root.

Link copied to clipboard
override val workingDirectory: FsEntry?

The working directory of this file system. If not null, resolve will be able to resolve relative paths from this directory.

Functions

Link copied to clipboard
override fun branch(workingDirectory: FsEntry?): FileSystem

Creates a new FileSystem branched from this one, with the given workingDirectory.

Link copied to clipboard
operator override fun equals(other: Any?): Boolean

File systems are compared by value: same backend, working directory, and branch lineage. This mirrors the behavior expected by recursive AST comparisons.

Link copied to clipboard
override fun hashCode(): Int
Link copied to clipboard
override fun relativePathTo(other: FileSystem): FsEntry?

Computes the relative path from this file system's workingDirectory to other's.

Link copied to clipboard
override fun reroot(workingDirectory: FsEntry?): FileSystem

Creates a new root FileSystem on the same backend, with the given workingDirectory and no branch lineage, so that isRoot holds for the result.

Link copied to clipboard
override fun resolve(path: String): FsEntry

Resolves a local file path, either absolutely or relatively from workingDirectory. This does not perform any check for file existence.