FILE *fdopen(int fildes, const char *type);
The type specified the stream must be allowed by the file access mode of the open file. The file position indicator associated with the new stream is set to the position indicated by the file offset associated with the file descriptor. The error indicator and end-of-file indicator for the stream are cleared.
When a file is opened for update, both input and output may be done on
the resulting stream.
However, output may not be directly followed by input without an
When a file is opened for append, you cannot overwrite information already
in the file.
You can use
When a stream is opened, it is fully buffered only if it does not refer to an interactive device.
Indicates the file descriptor to map to a file pointer.
Indicates a character string that specifies the desired type of file access. The first character of this string must be one of r (open for reading), w (open for writing), or a (open for writing at the end of file —append). After the first character, you can also add the + modifier that means to open for update, both reading and writing. The meaning of these flags is exactly as specified for
fopen(), except that w and w+ do not cause truncation of the file.
The fildes argument is not a valid file descriptor.
The value of the type argument is invalid.
Too many file descriptors are open in the calling process.
Insufficient storage space is available.
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition
PTC MKS Toolkit 10.3 Documentation Build 39.