LanguageVFS

interface LanguageVFS : GuestVFS

Guest: Language-virtual Filesystem

Describes the API surface of a guest language-specific virtual file system (VFS) implementation. The VFS system is aware of language VFS bindings, and provides these bindings in the event the corresponding language is requested for use in Elide.

Language-specific VFS implementations declare their languageId.

Types

Link copied to clipboard
interface LanguageVFSInfo

Describes a configured language-level virtual file system; this includes a fsProvider which can be used to obtain the VFS implementation, and a router function which decides if a path is eligible to be handled by the VFS.

Properties

Link copied to clipboard
abstract val compound: Boolean

Indicates whether this VFS implementation is backed by multiple layers.

Link copied to clipboard
abstract val deletable: Boolean

Indicates whether this VFS implementation allows deletion of files from the virtual file system.

Link copied to clipboard
abstract val host: Boolean

Indicates whether this VFS implementation is backed by host I/O facilities.

Link copied to clipboard
abstract val languageId: String

Well-known ID of the language which this VFS implementation is associated with.

Link copied to clipboard

Indicates whether this VFS implementation supports symbolic links.

Link copied to clipboard
abstract val virtual: Boolean

Indicates whether this VFS implementation is virtualized.

Link copied to clipboard
abstract val writable: Boolean

Indicates whether this VFS implementation allows writes to the virtual file system.

Functions

Link copied to clipboard
abstract fun accepts(path: Path): Boolean

Returns true if this VFS implementation should claim access to the provided path.

Link copied to clipboard

Indicates whether this VFS implementation allows access to host-side I/O for regular files on-disk. Unless I/O for guest->host access is enabled, this is always false.

Link copied to clipboard

Indicates whether this VFS implementation allows access to host-side I/O for native sockets. Unless I/O for guest->host access is enabled, this is always false.

Link copied to clipboard
abstract fun checkAccess(path: Path, modes: MutableSet<out AccessMode>, vararg linkOptions: LinkOption)
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

Determine whether the path provided exists in this VFS, considering lazy reads and other deferred activity; the default implementation simply delegates to Files.exists.

Link copied to clipboard
open fun getEncoding(path: Path): Charset
Link copied to clipboard
open fun getMimeType(path: Path): String
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
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