TABLE OF CONTENTS
::pwtk::writeFile
SYNOPSIS
proc ::pwtk::writeFile {filename content {flag w}} {
DESCRIPTION
Write a content to a file. By default, file is written in the overwrite mode. To append content to the end of an existing file, use the "a" mode.
ARGUMENTS
- filename -- name of the file to be written
- content -- content to be writtento a file
- flag -- (optional) access flag for the Tcl "open" command, i.e., w, w+, a, a+
EXAMPLE
::pwtk::writeFile test.txt {This is a test.txt file}
SOURCE
set fID [open $filename $flag] puts $fID $content flush $fID close $fID }