File

class File(path: String)

Multiplatform wrapper over java.io.File API

class File(path: String)

Multiplatform wrapper over java.io.File

class File(path: String)

Multiplatform wrapper over java.io.File

typealias File = File

Constructors

File
Link copied to clipboard
fun File(path: String)

Functions

exists
Link copied to clipboard
common
fun exists(): Boolean
Checks if the file exsists
fallback
fun exists(): Boolean
Checks if the file exsists
js
fun exists(): Boolean
Checks if the file exsists
native
fun exists(): Boolean
Checks if the file exsists
getAbsolutePath
Link copied to clipboard
common
fun getAbsolutePath(): String
Returns absolute path to this file
fallback
fun getAbsolutePath(): String
Returns absolute path to this file
js
fun getAbsolutePath(): String
Returns absolute path to this file
native
fun getAbsolutePath(): String
Returns absolute path to this file
getParentFile
Link copied to clipboard
common
fun getParentFile(): File
Retrieves parent file
fallback
fun getParentFile(): File
Retrieves parent file
js
fun getParentFile(): File
Retrieves parent file
native
fun getParentFile(): File
Retrieves parent file
getPath
Link copied to clipboard
common
fun getPath(): String
Returns local path to this file
fallback
fun getPath(): String
Returns local path to this file
js
fun getPath(): String
Returns local path to this file
native
fun getPath(): String
Returns local path to this file
isDirectory
Link copied to clipboard
common
fun isDirectory(): Boolean
checks if the file is directory
fallback
fun isDirectory(): Boolean
checks if the file is directory
js
fun isDirectory(): Boolean
checks if the file is directory
native
fun isDirectory(): Boolean
checks if the file is directory
mkdirs
Link copied to clipboard
common
fun mkdirs(): Boolean
Recursively makes all directories up to this directory file
fallback
fun mkdirs(): Boolean
Recursively makes all directories up to this directory file
js
fun mkdirs(): Boolean
Recursively makes all directories up to this directory file
native
fun mkdirs(): Boolean
Recursively makes all directories up to this directory file
toString
Link copied to clipboard
open override fun toString(): String
open override fun toString(): String
open override fun toString(): String

Extensions

deleteRecursively
Link copied to clipboard
common
fun File.deleteRecursively(): Boolean
Deletes this file and any subdirectories recursively
fallback
fun File.deleteRecursively(): Boolean
Deletes this file and any subdirectories recursively
js
fun File.deleteRecursively(): Boolean
Deletes this file and any subdirectories recursively
native
fun File.deleteRecursively(): Boolean
Deletes this file and any subdirectories recursively
readText
Link copied to clipboard
common
fun File.readText(): String
Reads this file as text
fallback
fun File.readText(): String
Reads this file as text
js
fun File.readText(): String
Reads this file as text
native
fun File.readText(): String
Reads this file as text
writeText
Link copied to clipboard
common
fun File.writeText(text: String)
Writes text to file creating it if needed and fully overwriting any previous content
fallback
fun File.writeText(text: String)
Writes text to file creating it if needed and fully overwriting any previous content
js
fun File.writeText(text: String)
Writes text to file creating it if needed and fully overwriting any previous content
native
fun File.writeText(text: String)
Writes text to file creating it if needed and fully overwriting any previous content