TABLE OF CONTENTS
::pwtk::fileMustExist
SYNOPSIS
proc ::pwtk::fileMustExist {file {fileType {}}} {
PURPOSE
Check if the file exists and if it does not, drop an error message and abort the execution.
ARGUMENTS
- file -- file to check its existence
- fileType -- type of file (e.g. XSF, PWO, ...) to include in the error message.
SOURCE
if { $fileType ne {} } { append fileType " " } if { ! [file exists $file] } { uplevel 1 [list ::pwtk::error "${fileType}file \"$file\" does not exist" 1] } }