ColdC: Function/Method Reference: cwritef()


INTEGER cwritef(STRING file_path[, INTEGER block])

This function opens the file specified by file_path 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 ~file is thrown.


Last Modified on Mar 2 1996
Copyright © 1995, 1996, Brandon Gillespie