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
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 exists

fun exists(): Boolean
fun exists(): Boolean

Checks if the file exsists

getAbsolutePath
Link copied to clipboard
common
fun getAbsolutePath(): String

Returns absolute path to this file

getParentFile
Link copied to clipboard
common
fun getParentFile(): File?

Retrieves parent file

getPath
Link copied to clipboard
common
fun getPath(): String

Returns local path to this file

isDirectory
Link copied to clipboard
common
fun isDirectory(): Boolean

Checks if the file is directory

fun isDirectory(): Boolean
fun isDirectory(): Boolean
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

toString
Link copied to clipboard
common
open override fun toString(): String

Extensions

deleteRecursively
Link copied to clipboard
common
fun File.deleteRecursively(): Boolean

Deletes this file and any subdirectories recursively

newline
Link copied to clipboard
val File.newline: String
val File.newline: String
val File.newline: String

Native newline separator for the platform (thanks a bunch, windows...)

readText
Link copied to clipboard
common
fun File.readText(): String

Reads this file as text

separator
Link copied to clipboard
val File.separator: String
val File.separator: String
val File.separator: String

Native file separator for the platform (thanks a bunch, windows...)

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