openInBrowser

Opens the file in the browser. The file must be an HTML file and the system must have a default browser configured. If the file is not an HTML file or if there is no default browser, an IOException may be thrown.

Parameters

file

the HTML file to open, must not be null


fun openInBrowser(fileName: String, html: String, dir: Path = KSL.outDir): File(source)

Opens the HTML file in the browser. The file is created in the specified directory with the given file name. The file will have a .html extension. If the directory does not exist, it will be created.

Return

the created temporary HTML file

Parameters

fileName

the name of the file, must not be null

html

the HTML string to write to the file, must not be null

dir

the directory to create the file in, defaults to KSL.outDir, must not be null