createFile

fun createFile(pathToFile: Path): File(source)

Return

the reference to the File

Parameters

pathToFile

the path to the file, must not be null and must not be a directory


fun createFile(fileName: String): File(source)

Creates a file in the directory that the program was launched from. Parent directories are created if they do not exist.

Return

the created File instance

Parameters

fileName

the name of the file to create


fun createFile(parentDir: Path, fileName: String): File(source)

Creates a file within a specific parent directory. Parent directories are created if they do not exist.

Return

the created File instance

Parameters

parentDir

the path to the directory that will contain the file

fileName

the name of the file to create