kvision / pl.treksoft.kvision.cordova / Entry

Entry

external interface Entry

Properties

filesystem

abstract var filesystem: FileSystem

fullPath

abstract var fullPath: String

isDirectory

abstract var isDirectory: Boolean

isFile

abstract var isFile: Boolean

name

abstract var name: String

Functions

copyTo

abstract fun copyTo(parent: DirectoryEntry, newName: String? = definedExternally, successCallback: EntryCallback? = definedExternally, errorCallback: ErrorCallback? = definedExternally): Unit

getMetadata

abstract fun getMetadata(successCallback: MetadataCallback, errorCallback: ErrorCallback? = definedExternally): Unit

getParent

abstract fun getParent(successCallback: DirectoryEntryCallback, errorCallback: ErrorCallback? = definedExternally): Unit

moveTo

abstract fun moveTo(parent: DirectoryEntry, newName: String? = definedExternally, successCallback: EntryCallback? = definedExternally, errorCallback: ErrorCallback? = definedExternally): Unit

remove

abstract fun remove(successCallback: VoidCallback, errorCallback: ErrorCallback? = definedExternally): Unit

toInternalURL

abstract fun toInternalURL(): String

toURL

abstract fun toURL(): String

Extension Functions

copyTo

suspend fun Entry.copyTo(parent: DirectoryEntry, newName: String? = null): Result<Entry, FileException>

Copy given file or directory to a new location.

createInstance

fun <T> Any?.createInstance(vararg args: dynamic): T

Helper function for creating JavaScript objects from dynamic constructors.

getMetadata

suspend fun Entry.getMetadata(): Result<Metadata, FileException>

Get file or directory metadata.

getParent

suspend fun Entry.getParent(): Result<DirectoryEntry, FileException>

Get file or directory parent directory entry.

moveTo

suspend fun Entry.moveTo(parent: DirectoryEntry, newName: String? = null): Result<Entry, FileException>

Move given file or directory to a new location.

remove

suspend fun Entry.remove(): Result<Entry, FileException>

Remove given file or directory.

Inheritors

DirectoryEntry

external interface DirectoryEntry : Entry

FileEntry

external interface FileEntry : Entry