AbstractBaseVFS

VFS: Guest Base

This base class describes the expected API for guest VFS implementations, including their builders (VFSBuilder) and factories (VFSFactory). Defaults are provided for the root system path and current-working-directory, both of which default to /.

Guest VFS implementations have their own subclass API, with which the abstract FS implementation can query for policy status, file membership, and so on. See the methods enforce and checkPolicy for more information.

Parameters

VFS

Concrete virtual file system type under implementation.

config

Effective guest VFS configuration to apply.

See also

for the public API of guest VFS implementations.

for a concrete implementation of a guest VFS backed by a real file system.

Inheritors

Types

Link copied to clipboard

Models the interface expected for VFS implementation builders, which should accept a uniform set of baseline settings (such as readOnly status, or the root path). Specialized FS implementations may extend this interface with additional settings.

Link copied to clipboard

Specifies the expected API surface of a VFS builder's static interface. This interface is used to construct new builders, regardless of implementation (see newBuilder).

Link copied to clipboard

Specifies the expected API surface of a VFS implementation's companion object, which should be equipped to create and resolve VFS implementations using the VFSBuilder and VFSBuilderFactory.

Properties

Link copied to clipboard
abstract val compound: Boolean
Link copied to clipboard
abstract val deletable: Boolean
Link copied to clipboard
abstract val host: Boolean
Link copied to clipboard
abstract val logging: Logger

Subclass API: Logging.

Link copied to clipboard
Link copied to clipboard
abstract val virtual: Boolean
Link copied to clipboard
abstract val writable: Boolean

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract fun checkAccess(path: Path, modes: MutableSet<out AccessMode>, vararg linkOptions: LinkOption)
Link copied to clipboard
abstract fun checkPolicy(request: AccessRequest): AccessResponse
fun checkPolicy(type: AccessType, domain: AccessDomain, path: Path, scope: AccessScope = AccessScope.UNSPECIFIED): AccessResponse

Subclass API: Policy check.

Link copied to clipboard
abstract override fun close()
Link copied to clipboard
open fun copy(source: Path, target: Path, vararg options: CopyOption)
Link copied to clipboard
abstract fun createDirectory(dir: Path, vararg attrs: FileAttribute<*>)
Link copied to clipboard
open fun createLink(link: Path, existing: Path)
Link copied to clipboard
open fun createSymbolicLink(link: Path, target: Path, vararg attrs: FileAttribute<*>)
Link copied to clipboard
abstract fun delete(path: Path)
Link copied to clipboard
open fun existsAny(path: Path): Boolean
Link copied to clipboard
open fun getEncoding(path: Path): Charset
Link copied to clipboard
open fun getMimeType(path: Path): String
Link copied to clipboard
abstract fun getPath(vararg segments: String): Path

Subclass API: Parse a path.

Link copied to clipboard
Link copied to clipboard
open fun getSeparator(): String
Link copied to clipboard
Link copied to clipboard
open fun isSameFile(path1: Path, path2: Path, vararg options: LinkOption): Boolean
Link copied to clipboard
open fun move(source: Path, target: Path, vararg options: CopyOption)
Link copied to clipboard
abstract fun newByteChannel(path: Path, options: MutableSet<out OpenOption>, vararg attrs: FileAttribute<*>): SeekableByteChannel
Link copied to clipboard
Link copied to clipboard
abstract fun parsePath(uri: URI): Path
abstract fun parsePath(path: String): Path
Link copied to clipboard
abstract fun readAttributes(path: Path, attributes: String, vararg options: LinkOption): MutableMap<String, Any>
Link copied to clipboard
abstract fun readStream(path: Path, vararg options: OpenOption): InputStream

Subclass API: Read a file.

Link copied to clipboard
open fun readSymbolicLink(link: Path): Path
Link copied to clipboard
open fun setAttribute(path: Path, attribute: String, value: Any, vararg options: LinkOption)
Link copied to clipboard
open fun setCurrentWorkingDirectory(currentWorkingDirectory: Path)
Link copied to clipboard
abstract fun toAbsolutePath(path: Path): Path
Link copied to clipboard
abstract fun toRealPath(path: Path, vararg linkOptions: LinkOption): Path
Link copied to clipboard
abstract fun writeStream(path: Path, vararg options: OpenOption): OutputStream

Subclass API: Write a file.