createFileWithExtension

fun createFileWithExtension(fileName: String?, extension: String?, parentDir: Path = KSL.outDir): File(source)

Creates a file with a guaranteed extension in the specified parent directory. If the file name is null, a temporary name is generated.

Return

the created File instance

Parameters

fileName

the desired name of the file (can be null)

extension

the required extension (e.g., "csv", "txt")

parentDir

the directory to place the file in (defaults to KSL.outDir)