/
ColdC/Functions/
ColdC/Structure/
<head><title>ColdC: Function/Method Reference: cwritef()</title></head>

<body>

<h1 align=center><a href="/ColdC/">ColdC</a>: <a href="/ColdC/Functions/">Function/Method Reference</a>: cwritef()</h1>

<hr>

<p><font size=+1><i>INTEGER</i> <b>cwritef</b>(<i>STRING <b>file_path</b>[, INTEGER <b>block</b>]</i>)</font>

<p>This function opens the file specified by <var>file_path</var> and
writes it's contents directly to the connection.  The block size it reads
and writes (defaulting to the driver defined variable in defs.h DEF_BLOCKSIZE,
usually this is 512) can be changed by specifying an optional second argument.
If the second is a negative one (-1) it will attempt to read the entire
file at once, and write it to the connection (the old coldmud behavior).
The size of the file (in bytes) is returned.  If a problem arises the
error <code>~file</code> is thrown.

<p><hr size=4><p align=center><i>Last Modified on Mar 2 1996</i>
<br><i>Copyright &copy; 1995, 1996, Brandon Gillespie</i>
</body>