Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


Share this Page URL
Help

Chapter 10. File and Text Operations > File Objects - Pg. 209

File and Text Oper- ations O_CREAT Creates file , if file does not already exist O_EXCL Raises an exception if file already exists O_TRUNC Throws away previous contents of file (incompatible with O_RDONLY ) O_BINARY Open file in binary rather than text mode on non-Unix platforms (innocuous and without effect on Unix and Unix-like platforms) pipe pipe( ) Creates a pipe and returns a pair of file descriptors ( r , w ) open for reading and writing respectively. read read(fd,n) Reads up to n bytes from file descriptor fd and returns them as a string. Reads and returns