C Language and Libraries Help (clang.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
File Constants
                                             Up Contents Index Back
─────Run-Time Library───────────────────────────────────────────────────────
 
  Constant:  _O_APPEND, _O_CREAT, _O_EXCL, _O_RDONLY, _O_RDWR,
             _O_TRUNC, _O_WRONLY
 
  Include:   <fcntl.h>
 
  Context:   _open, _sopen, _dos_open
 
  Summary:   The integer expression formed from one or more of these
             constants determines the type of reading or writing
             operations permitted. It is formed by combining one or
             more constants with a translation-mode constant.
             See: _O_BINARY, _O_TEXT
 
     The file constants are described below:
 
     Constant      Meaning
 
     _O_APPEND     Repositions the file pointer to the end of the file
                   before every write operation.
 
     _O_CREAT      Creates and opens a new file for writing; this has
                   no effect if the file specified by the path name
                   exists.
 
     _O_EXCL       Returns an error value if the file specified by the
                   path name exists. Only applies when used with
                   _O_CREAT.
 
     _O_RDONLY     Opens file for reading only; if this flag is given,
                   neither _O_RDWR nor _O_WRONLY can be given.
 
     _O_RDWR       Opens file for both reading and writing; if this
                   flag is given, neither _O_RDONLY nor _O_WRONLY can
                   be given.
 
     _O_TRUNC      Opens and truncates an existing file to zero length;
                   the file must have write permission. The contents of
                   the file are destroyed. If this flag is given,
                   _O_RDONLY cannot be given.
 
     _O_WRONLY     Opens file for writing only; if this flag is given,
                   neither _O_RDONLY nor _O_RDWR can be given.
                                    -♦-