File

actual typealias File = File
expect class File(path: String)

Multiplatform wrapper over java.io.File API

actual class File(path: String)

Multiplatform wrapper over java.io.File

actual class File(path: String)

Multiplatform wrapper over java.io.File API

actual typealias File = File
actual class File(path: String)

Multiplatform wrapper over java.io.File

Constructors

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

Functions

exists
Link copied to clipboard
expect fun exists(): Boolean

Checks if the file exists

actual fun exists(): Boolean

Checks if the file exsists

actual fun exists(): Boolean

Checks if the file exsists

actual fun exists(): Boolean

Checks if the file exists

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

Returns absolute path to this file

actual fun getAbsolutePath(): String

Returns absolute path to this file

actual fun getAbsolutePath(): String

Returns absolute path to this file

actual fun getAbsolutePath(): String

Returns absolute path to this file

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

Retrieves parent file

actual fun getParentFile(): File?

Retrieves parent file

actual fun getParentFile(): File?

Retrieves parent file

actual fun getParentFile(): File?

Retrieves parent file

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

Returns local path to this file

actual fun getPath(): String

Returns local path to this file

actual fun getPath(): String

Returns local path to this file

actual fun getPath(): String

Returns local path to this file

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

Checks if the file is directory

actual fun isDirectory(): Boolean

checks if the file is directory

actual fun isDirectory(): Boolean

checks if the file is directory

actual fun isDirectory(): Boolean

checks if the file is directory

mkdirs
Link copied to clipboard
expect fun mkdirs(): Boolean

Recursively makes all directories up to this directory file

actual fun mkdirs(): Boolean

Recursively makes all directories up to this directory file

actual fun mkdirs(): Boolean

Recursively makes all directories up to this directory file

actual fun mkdirs(): Boolean

Recursively makes all directories up to this directory file

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

Extensions

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

Deletes this file and any subdirectories recursively

actual fun File.deleteRecursively(): Boolean

Deletes this file and any subdirectories recursively

actual fun File.deleteRecursively(): Boolean

Deletes this file and any subdirectories recursively

actual fun File.deleteRecursively(): Boolean

Deletes this file and any subdirectories recursively

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

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

actual val File.newline: String

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

actual val File.newline: String

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

actual val File.newline: String

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

actual val File.newline: String

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

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

Reads this file as text

actual fun File.readText(): String

Reads this file as text

actual fun File.readText(): String

Reads this file as text

actual fun File.readText(): String

Reads this file as text

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

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

actual val File.separator: String

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

actual val File.separator: String

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

actual val File.separator: String

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

actual val File.separator: String

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

writeText
Link copied to clipboard
expect fun File.writeText(text: String)

Writes text to file creating it if needed and fully overwriting any previous content

actual fun File.writeText(text: String)

Writes text to file creating it if needed and fully overwriting any previous content

actual fun File.writeText(text: String)

Writes text to file creating it if needed and fully overwriting any previous content

actual fun File.writeText(text: String)

Writes text to file creating it if needed and fully overwriting any previous content