kvision / pl.treksoft.kvision.cordova / File

File

object File

Main object for Cordova file.

Types

FileSystemType

enum class FileSystemType

File system types.

Properties

ABORT_ERR

const val ABORT_ERR: Int

ENCODING_ERR

const val ENCODING_ERR: Int

INVALID_MODIFICATION_ERR

const val INVALID_MODIFICATION_ERR: Int

INVALID_STATE_ERR

const val INVALID_STATE_ERR: Int

NO_MODIFICATION_ALLOWED_ERR

const val NO_MODIFICATION_ALLOWED_ERR: Int

NOT_FOUND_ERR

const val NOT_FOUND_ERR: Int

NOT_READABLE_ERR

const val NOT_READABLE_ERR: Int

PATH_EXISTS_ERR

const val PATH_EXISTS_ERR: Int

QUOTA_EXCEEDED_ERR

const val QUOTA_EXCEEDED_ERR: Int

SECURITY_ERR

const val SECURITY_ERR: Int

SYNTAX_ERR

const val SYNTAX_ERR: Int

TYPE_MISMATCH_ERR

const val TYPE_MISMATCH_ERR: Int

Functions

getSystemDirectories

suspend fun getSystemDirectories(): SystemDirs

Get system directories.

requestFileSystem

suspend fun requestFileSystem(fileSystemType: File.FileSystemType, size: Long = 0): Result<FileSystem, FileException>

Request a file system of a given type.

resolveLocalFileSystemURL

suspend fun resolveLocalFileSystemURL(url: String): Result<Entry, FileException>

Resolve given path to a file or directory entry.

resolveLocalFileSystemURLForDir

suspend fun resolveLocalFileSystemURLForDir(url: String): Result<DirectoryEntry, FileException>

Resolve given path to a directory entry.

resolveLocalFileSystemURLForFile

suspend fun resolveLocalFileSystemURLForFile(url: String): Result<FileEntry, FileException>

Resolve given path to a file entry.

Extension Functions

createInstance

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

Helper function for creating JavaScript objects from dynamic constructors.