VfsFile

data class VfsFile(val vfs: Vfs, val path: String) : VfsNamed, AsyncInputOpenable, Extra

Constructors

Link copied to clipboard
constructor(vfs: Vfs, path: String)

Types

Link copied to clipboard
data class ProcessResult(val exitCode: Int, val stdout: String, val stderr: String)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override var extra: ExtraType
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override val pathInfo: PathInfo
Link copied to clipboard
Link copied to clipboard
val vfs: Vfs

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
suspend fun chmod(mode: Vfs.UnixPermissions)
Link copied to clipboard
suspend fun copyTo(target: AsyncOutputStream): Long
suspend fun copyTo(target: VfsFile, vararg attributes: Vfs.Attribute): Long
Link copied to clipboard
suspend fun copyToRecursively(target: VfsFile, vararg attributes: Vfs.Attribute, notify: suspend (Pair<VfsFile, VfsFile>) -> Unit = {})

Copies this VfsFile into the target VfsFile.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
suspend fun delete(): Boolean
Link copied to clipboard
suspend fun VfsFile.deleteRecursively(includeSelf: Boolean = true)

Deletes all the files in this folder recursively. If the entry is a file instead of a directory, the file is deleted.

Link copied to clipboard
suspend fun ensureParents(): VfsFile
Link copied to clipboard
suspend fun exec(cmdAndArgs: List<String>, env: Map<String, String> = LinkedHashMap(), handler: VfsProcessHandler = VfsProcessHandler()): Int
Link copied to clipboard
suspend fun execProcess(vararg cmdAndArgs: String, env: Map<String, String> = LinkedHashMap(), captureError: Boolean = false, charset: Charset = UTF8): VfsFile.ProcessResult
suspend fun execProcess(cmdAndArgs: List<String>, env: Map<String, String> = LinkedHashMap(), captureError: Boolean = false, charset: Charset = UTF8): VfsFile.ProcessResult
Link copied to clipboard
suspend fun execToString(vararg cmdAndArgs: String, charset: Charset = UTF8): String
suspend fun execToString(cmdAndArgs: List<String>, env: Map<String, String> = LinkedHashMap(), charset: Charset = UTF8, captureError: Boolean = false, throwOnError: Boolean = true): String
Link copied to clipboard
suspend fun exists(): Boolean
Link copied to clipboard
Link copied to clipboard
operator fun get(path: String): VfsFile
Link copied to clipboard
inline suspend fun <T : Vfs.Attribute> getAttribute(): T?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
suspend fun isDirectory(): Boolean
Link copied to clipboard
suspend fun isFile(): Boolean
Link copied to clipboard
fun jail(): VfsFile
Link copied to clipboard
Link copied to clipboard
suspend fun list(): Flow<VfsFile>
Link copied to clipboard
suspend fun listNames(): List<String>
Link copied to clipboard
suspend fun listRecursive(filter: (VfsFile) -> Boolean = { true }): Flow<VfsFile>
Link copied to clipboard
suspend fun listRecursiveSimple(filter: (VfsFile) -> Boolean = { true }): List<VfsFile>
Link copied to clipboard
suspend fun listSimple(): List<VfsFile>
Link copied to clipboard
suspend fun VfsFile.loadProperties(charset: Charset = UTF8): Props
Link copied to clipboard
Link copied to clipboard
suspend fun AsyncInputOpenable.md5(): Hash
Link copied to clipboard
Link copied to clipboard
suspend fun mkdir(vararg attributes: Vfs.Attribute): Boolean
suspend fun mkdir(attributes: List<Vfs.Attribute>): Boolean
Link copied to clipboard
suspend fun mkdirs(vararg attributes: Vfs.Attribute): Boolean
suspend fun mkdirs(attributes: List<Vfs.Attribute>): Boolean
Link copied to clipboard
suspend fun open(mode: VfsOpenMode = VfsOpenMode.READ): AsyncStream
Link copied to clipboard
suspend fun VfsFile.openAsIso(): VfsFile
suspend fun <R> VfsFile.openAsIso(callback: suspend (VfsFile) -> R): R
Link copied to clipboard
suspend fun VfsFile.openAsZip(caseSensitive: Boolean = true, useNativeDecompression: Boolean = true): VfsFile
suspend fun <R> VfsFile.openAsZip(caseSensitive: Boolean = true, useNativeDecompression: Boolean = true, callback: suspend (VfsFile) -> R): R
Link copied to clipboard
Link copied to clipboard
open suspend override fun openRead(): AsyncStream
Link copied to clipboard
inline suspend fun <T> openUse(mode: VfsOpenMode = VfsOpenMode.READ, callback: AsyncStream.() -> T): T
Link copied to clipboard
inline suspend fun <T> AsyncInputOpenable.openUse(block: (AsyncInputStream) -> T): T
Link copied to clipboard
suspend fun passthru(vararg cmdAndArgs: String, env: Map<String, String> = LinkedHashMap(), charset: Charset = UTF8): Int
suspend fun passthru(cmdAndArgs: List<String>, env: Map<String, String> = LinkedHashMap(), charset: Charset = UTF8): Int
Link copied to clipboard
fun VfsFile.proxied(transform: suspend (VfsFile) -> VfsFile): VfsFile
Link copied to clipboard
suspend fun put(content: AsyncInputStream, vararg attributes: Vfs.Attribute): Long
suspend fun put(content: AsyncInputStream, attributes: List<Vfs.Attribute> = listOf()): Long
Link copied to clipboard
suspend fun read(): ByteArray
Link copied to clipboard
suspend fun readAll(): ByteArray
Link copied to clipboard
Link copied to clipboard
suspend fun VfsFile.readAtlas(props: ImageDecodingProps = ImageDecodingProps.DEFAULT): Atlas
Link copied to clipboard
suspend fun VfsFile.readAudioData(formats: AudioFormat = defaultAudioFormats, props: AudioDecodingProps = AudioDecodingProps.DEFAULT): AudioData
Link copied to clipboard
suspend fun VfsFile.readAudioStream(formats: AudioFormat = defaultAudioFormats + nativeSoundProvider.audioFormats, props: AudioDecodingProps = AudioDecodingProps.DEFAULT): AudioStream
Link copied to clipboard
suspend fun VfsFile.readAudioStreamOrNull(formats: AudioFormat = defaultAudioFormats + nativeSoundProvider.audioFormats, props: AudioDecodingProps = AudioDecodingProps.DEFAULT): AudioStream?
Link copied to clipboard
suspend fun VfsFile.readBitmap(props: BaseImageDecodingProps = ImageDecodingProps.DEFAULT): Bitmap
Link copied to clipboard
suspend fun VfsFile.readBitmapFont(props: ImageDecodingProps = ImageDecodingProps.DEFAULT, mipmaps: Boolean = true, atlas: MutableAtlasUnit? = null): BitmapFont
Link copied to clipboard
suspend fun VfsFile.readBitmapImageData(props: BaseImageDecodingProps = ImageDecodingProps.DEFAULT): ImageData
Link copied to clipboard
suspend fun VfsFile.readBitmapInfo(props: BaseImageDecodingProps = ImageDecodingProps.DEFAULT): ImageInfo?
Link copied to clipboard
suspend fun VfsFile.readBitmapListNoNative(props: BaseImageDecodingProps = ImageDecodingProps.DEFAULT): List<Bitmap>
Link copied to clipboard
suspend fun VfsFile.readBitmapNative(props: BaseImageDecodingProps = ImageDecodingProps.DEFAULT): Bitmap
Link copied to clipboard
suspend fun VfsFile.readBitmapNoNative(props: BaseImageDecodingProps = ImageDecodingProps.DEFAULT): Bitmap
Link copied to clipboard
suspend fun VfsFile.readBitmapSlice(bprops: BaseImageDecodingProps, name: String? = null, atlas: MutableAtlasUnit? = null): BmpSlice
suspend fun VfsFile.readBitmapSlice(name: String? = null, atlas: MutableAtlasUnit? = null, props: BaseImageDecodingProps = ImageDecodingProps.DEFAULT): BmpSlice
Link copied to clipboard
suspend fun VfsFile.readBitmapSliceWithOrientation(props: ImageDecodingProps = ImageDecodingProps.DEFAULT, name: String? = null, atlas: MutableAtlasUnit? = null): BmpSlice
Link copied to clipboard
suspend fun readBytes(): ByteArray
Link copied to clipboard
suspend fun readChunk(offset: Long, size: Int): ByteArray
Link copied to clipboard
suspend fun VfsFile.readFont(preload: Boolean = false, props: ImageDecodingProps = ImageDecodingProps.DEFAULT, mipmaps: Boolean = true): Font
Link copied to clipboard
suspend fun VfsFile.readImageData(props: BaseImageDecodingProps = ImageDecodingProps.DEFAULT, atlas: MutableAtlas<Unit>? = null): ImageData
Link copied to clipboard
suspend fun VfsFile.readImageDataContainer(props: BaseImageDecodingProps = ImageDecodingProps.DEFAULT, atlas: MutableAtlas<Unit>? = null): ImageDataContainer
Link copied to clipboard
suspend fun VfsFile.readImageInfo(props: BaseImageDecodingProps = ImageDecodingProps.DEFAULT): ImageInfo?
Link copied to clipboard
suspend fun readLines(charset: Charset = UTF8): Sequence<String>
Link copied to clipboard
suspend fun VfsFile.readMusic(props: AudioDecodingProps = AudioDecodingProps.DEFAULT): Sound
Link copied to clipboard
suspend fun VfsFile.readNativeImage(props: BaseImageDecodingProps = ImageDecodingProps.DEFAULT): NativeImage
Link copied to clipboard
suspend fun VfsFile.readNinePatch(props: ImageDecodingProps = ImageDecodingProps.DEFAULT): NinePatchBmpSlice
Link copied to clipboard
suspend fun VfsFile.readProperties(charset: Charset = Charsets.UTF8): Properties
Link copied to clipboard
suspend fun readRangeBytes(range: IntRange): ByteArray
suspend fun readRangeBytes(range: LongRange): ByteArray
Link copied to clipboard
suspend fun VfsFile.readSound(props: AudioDecodingProps = AudioDecodingProps.DEFAULT, streaming: Boolean = false): Sound
Link copied to clipboard
suspend fun VfsFile.readSoundInfo(formats: AudioFormat = defaultAudioFormats, props: AudioDecodingProps = AudioDecodingProps.DEFAULT): AudioFormat.Info?
Link copied to clipboard
suspend fun readString(charset: Charset = UTF8): String
Link copied to clipboard
suspend fun VfsFile.readSVG(): SVG
Link copied to clipboard
suspend fun VfsFile.readTtfFont(onlyReadMetadata: Boolean = false, enableLigatures: Boolean = true): TtfFont
Link copied to clipboard
Link copied to clipboard
suspend fun VfsFile.readWoffFont(onlyReadMetadata: Boolean = false): WoffFont
Link copied to clipboard
suspend fun VfsFile.readXml(): Xml
Link copied to clipboard
suspend fun redirected(pathRedirector: suspend VfsFile.(String) -> String): VfsFile
Link copied to clipboard
fun relativePathTo(relative: VfsFile): String?
Link copied to clipboard
suspend fun rename(src: String, dst: String): Boolean

Renames the file determined by this plus src to this plus dst

Link copied to clipboard
suspend fun renameTo(dstPath: String): Boolean

Renames this file into the dstPath relative to the root of this vfs

Link copied to clipboard
suspend fun VfsFile.saveProperties(props: Props, charset: Charset = UTF8)
Link copied to clipboard
suspend fun setAttributes(vararg attributes: Vfs.Attribute)
suspend fun setAttributes(attributes: List<Vfs.Attribute>)
Link copied to clipboard
suspend fun setSize(size: Long)
Link copied to clipboard
inline suspend fun VfsFile.setUnixPermission(permissions: Vfs.UnixPermissions)
Link copied to clipboard
Link copied to clipboard
suspend fun size(): Long
Link copied to clipboard
suspend fun stat(): VfsStat
Link copied to clipboard
suspend fun takeIfExists(): VfsFile?
Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
suspend fun touch(time: DateTime, atime: DateTime = time)
Link copied to clipboard
Link copied to clipboard
suspend fun <R> VfsFile.useVfs(callback: suspend (VfsFile) -> R): R
Link copied to clipboard
suspend fun watch(handler: suspend (Vfs.FileEvent) -> Unit): Closeable
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun VfsFile.withOnce(once: suspend (VfsFile) -> Unit): VfsFile
Link copied to clipboard
suspend fun write(data: ByteArray, vararg attributes: Vfs.Attribute): Long
Link copied to clipboard
suspend fun VfsFile.writeAudio(data: AudioData, formats: AudioFormat = defaultAudioFormats + nativeSoundProvider.audioFormats, props: AudioEncodingProps = AudioEncodingProps.DEFAULT)
Link copied to clipboard
suspend fun VfsFile.writeBitmap(bitmap: Bitmap, format: ImageFormat, props: ImageEncodingProps = ImageEncodingProps())
Link copied to clipboard
suspend fun writeBytes(data: ByteArray, vararg attributes: Vfs.Attribute): Long
Link copied to clipboard
suspend fun writeChunk(data: ByteArray, offset: Long, resize: Boolean = false)
Link copied to clipboard
suspend fun writeFile(file: VfsFile, vararg attributes: Vfs.Attribute): Long
Link copied to clipboard
suspend fun writeLines(lines: Iterable<String>, charset: Charset = UTF8)
Link copied to clipboard
suspend fun writeStream(src: AsyncInputStream, vararg attributes: Vfs.Attribute, autoClose: Boolean = true): Long
Link copied to clipboard
suspend fun writeString(data: String, vararg attributes: Vfs.Attribute, charset: Charset = UTF8)