Tcl API Reference -- ns_writefp

### ns_writefp

#### Overview

Write file contents to the connection

#### Syntax

ns_writefp fileid ?nbytes?

#### Description

ns_writefp writes the contents of the specified file to the connection. You can specify the number of bytes to be copied in the nbytes argument. By default, the entire file is copied.

#### Example

        ns_register_proc GET /sampleWriteFp sampleWriteFp
        proc sampleWriteFp { conn ignore } {
            set file [open "/home/people/juan/machine.txt" r]
            ns_writefp $file
            close $file
        }

Top of Page
Copyright © 1998-99 America Online, Inc.