::hwat::io::CreateFile

Create a file and open it.

Syntax

::hwat::io::CreateFile str_mode {str_filePath}

Arguments

str_mode
Mode argument. Can be any valid Tcl open mode.
str_filePath
Argument to serve as the path for the file. Without, just opens a temp file.
Optional.

Returns

Success
[list str_fh $str_fh str_fileName $str_filePath]
Failure
{}

Where,

$str_fh = actual file handle to file.

$str_filePath = actual file name/path.

Example

::hwat::io::CreateFile w+ c:/mystuff/data.txt