Cold Help System: Programming: ColdC Reference Manual: Functions: Network: 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.


bind_port() | close_connection() | connection() | cwrite() | cwritef() | open_connection() | reassign_connection() | unbind_port()


the Cold Dark