FS

interface FS

Functions

Link copied to clipboard
abstract fun assertFailed(message: String, expected: Any? = null, actual: Any? = null): Throwable

Creates an assertion failed exception to throw.

Link copied to clipboard
abstract fun fileExists(typedPath: TypedPath): Boolean

Returns true if the given path exists and is a file, false if it doesn't or if it is a folder.

Link copied to clipboard
open fun fileRead(typedPath: TypedPath): String
Link copied to clipboard
abstract fun fileReadBinary(typedPath: TypedPath): ByteArray
Link copied to clipboard
abstract fun <T> fileWalk(typedPath: TypedPath, walk: (Sequence<TypedPath>) -> T): T

Walks the files (not directories) which are children and grandchildren of the given path.

Link copied to clipboard
open fun fileWrite(typedPath: TypedPath, content: String)
Link copied to clipboard
abstract fun fileWriteBinary(typedPath: TypedPath, content: ByteArray)