external interface DirectoryEntry : Entry
abstract var filesystem: FileSystem |
|
abstract var fullPath: String |
|
abstract var isDirectory: Boolean |
|
abstract var isFile: Boolean |
|
abstract var name: String |
abstract fun createReader(): DirectoryReader |
|
abstract fun getDirectory(path: String, options: Flags? = definedExternally, successCallback: DirectoryEntryCallback?, errorCallback: ErrorCallback? = definedExternally): Unit |
|
abstract fun getFile(path: String, options: Flags? = definedExternally, successCallback: FileEntryCallback?, errorCallback: ErrorCallback? = definedExternally): Unit |
|
abstract fun removeRecursively(successCallback: VoidCallback, 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 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 DirectoryEntry.getDirectory(path: String, create: Boolean = true, exclusive: Boolean = false): Result<DirectoryEntry, FileException>
Get or create a directory in a given parent directory. |
|
suspend fun DirectoryEntry.getFile(path: String, create: Boolean = true, exclusive: Boolean = false): Result<FileEntry, FileException>
Get or create a file in a given parent directory. |
|
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 DirectoryEntry.readEntries(): Result<List<Entry>, FileException>
List directory entries for a given parent directory entry. |
|
suspend fun Entry.remove(): Result<Entry, FileException>
Remove given file or directory. |
|
suspend fun DirectoryEntry.removeRecursively(): Result<DirectoryEntry, FileException>
Remove given directory recursively. |