7.16.9 textWrite and textWriteExec

Prev Up Next Page 280 of 800 Search internet

The textWrite request is like the fileWrite request but takes an extra parameter:

eager define textWrite ( p , n , c ) as lgcio ( TextWrite :: p :: EOS :: n :: EOS :: c ) end define

The bytes in n replace newline sequences in c when writing to the file named p. The sequence n of bytes is not allowed to contain null bytes. Typically, the sequence n will be a 10-byte (LF), a 13-byte (CR), a 13-byte followed by a 10-byte (CRLF), or a 10-byte followed by a 13-byte (LFCR). Each occurrence of a LF, CR, CRLF, or LFCR in c is considered to be a newline sequence and is replaced by n. Note that neither before nor after conversion, the file needs to follow the newline convention.

textWriteExec is similar but uses mode 0777 instead of mode 0666. Hence, created files become executable.

Prev Up Next Page 280 of 800 Search logiweb.eu

Copyright © 2010 Klaus Grue, GRD-2010-01-05