external interface FileEntry : Entry
abstract var filesystem: FileSystem |
|
abstract var fullPath: String |
|
abstract var isDirectory: Boolean |
|
abstract var isFile: Boolean |
|
abstract var name: String |
abstract fun createWriter(successCallback: FileWriterCallback, errorCallback: ErrorCallback? = definedExternally): Unit |
|
abstract fun file(successCallback: FileCallback, errorCallback: ErrorCallback? = definedExternally): Unit |
abstract fun copyTo(parent: DirectoryEntry, newName: String? = definedExternally, successCallback: EntryCallback? = definedExternally, errorCallback: ErrorCallback? = definedExternally): Unit |
|
abstract fun getMetadata(successCallback: MetadataCallback, errorCallback: ErrorCallback? = definedExternally): Unit |
|
abstract fun getParent(successCallback: DirectoryEntryCallback, errorCallback: ErrorCallback? = definedExternally): Unit |
|
abstract fun moveTo(parent: DirectoryEntry, newName: String? = definedExternally, successCallback: EntryCallback? = definedExternally, errorCallback: ErrorCallback? = definedExternally): Unit |
|
abstract fun remove(successCallback: VoidCallback, errorCallback: ErrorCallback? = definedExternally): Unit |
|
abstract fun toInternalURL(): String |
|
abstract fun toURL(): String |
suspend fun FileEntry.append(data: <ERROR CLASS>): Result<FileEntry, FileException>
Append file content from a Blob. suspend fun FileEntry.append(data: String): Result<FileEntry, FileException>
Append file content from a plain string. |
|
suspend fun Entry.copyTo(parent: DirectoryEntry, newName: String? = null): Result<Entry, FileException>
Copy given file or directory to a new location. |
|
fun <T> Any?.createInstance(vararg args: dynamic): T
Helper function for creating JavaScript objects from dynamic constructors. |
|
suspend fun FileEntry.createWriter(): Result<FileWriter, FileException>
Create a FileWriter object for a given file entry. |
|
suspend fun FileEntry.file(): Result<File, FileException>
Get a File object for a given file entry. |
|
suspend fun Entry.getMetadata(): Result<Metadata, FileException>
Get file or directory metadata. |
|
suspend fun Entry.getParent(): Result<DirectoryEntry, FileException>
Get file or directory parent directory entry. |
|
suspend fun Entry.moveTo(parent: DirectoryEntry, newName: String? = null): Result<Entry, FileException>
Move given file or directory to a new location. |
|
suspend fun FileEntry.readAsArrayBuffer(): Result<<ERROR CLASS>, FileException>
Read file content as an array buffer. |
|
suspend fun FileEntry.readAsDataURL(): Result<String, FileException>
Read file content as a data url. |
|
suspend fun FileEntry.readAsText(): Result<String, FileException>
Read file content as a plain string. |
|
suspend fun Entry.remove(): Result<Entry, FileException>
Remove given file or directory. |
|
suspend fun FileEntry.write(data: <ERROR CLASS>): Result<FileEntry, FileException>
Write file content from a Blob. suspend fun FileEntry.write(data: String): Result<FileEntry, FileException>
Write file content from a plain string. |
|
suspend fun FileEntry.writeDataUrL(dataUrl: String): Result<FileEntry, FileException>
Write file content from a data url. |