writeto

LUA

writeto

writeto (FILENAME)

With a flle name, it opens the named flle, sets _OUTPUT with its handle and returns this value.Does not close the current output flle.An existing fllewill be completely erased.Without parameters, it closes the _OUTPUT flle, and restores stdout as the value of _OUTPUT. On error, it returns nil , plus a string describing the error. If FILENAME startswith a | (pipe character), then output is piped via the C function popen. Not all systems implement pipes.