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

EXAMPLE

    ::pwtk::writeFile test.txt {This is a test.txt file} 

SOURCE

    set   fID  [open $filename $flag]
    puts  $fID $content
    flush $fID
    close $fID
}