kvision / pl.treksoft.kvision.cordova / File

File

(js) object File

Main object for Cordova file.

Types

(js)

FileSystemType

File system types.

enum class FileSystemType

Properties

(js)

ABORT_ERR

const val ABORT_ERR: Int
(js)

ENCODING_ERR

const val ENCODING_ERR: Int
(js)

INVALID_MODIFICATION_ERR

const val INVALID_MODIFICATION_ERR: Int
(js)

INVALID_STATE_ERR

const val INVALID_STATE_ERR: Int
(js)

NO_MODIFICATION_ALLOWED_ERR

const val NO_MODIFICATION_ALLOWED_ERR: Int
(js)

NOT_FOUND_ERR

const val NOT_FOUND_ERR: Int
(js)

NOT_READABLE_ERR

const val NOT_READABLE_ERR: Int
(js)

PATH_EXISTS_ERR

const val PATH_EXISTS_ERR: Int
(js)

QUOTA_EXCEEDED_ERR

const val QUOTA_EXCEEDED_ERR: Int
(js)

SECURITY_ERR

const val SECURITY_ERR: Int
(js)

SYNTAX_ERR

const val SYNTAX_ERR: Int
(js)

TYPE_MISMATCH_ERR

const val TYPE_MISMATCH_ERR: Int

Functions

(js)

getSystemDirectories

Get system directories.

suspend fun getSystemDirectories(): SystemDirs
(js)

requestFileSystem

Request a file system of a given type.

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

resolveLocalFileSystemURL

Resolve given path to a file or directory entry.

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

resolveLocalFileSystemURLForDir

Resolve given path to a directory entry.

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

resolveLocalFileSystemURLForFile

Resolve given path to a file entry.

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