RAD Studio |  |

fcntl.h
Collapse All

The following functions, macros, and classes are provided in fcntl.h:

Topics

Name | Description
O_xxxx #defines | Header File fcntl.h Description These #defines are bit definitions for a file-access argument. These RTL file-open functions use some (not all) of these definitions: fdopen fopen freopen _fsopen open _rtl_open sopen sopen also uses file-sharing symbolic constants in the file-access argument.
_fmode | Header File fcntl.h Syntax extern int _fmode; Description _fmode determines in which mode (text or binary) files will be opened and translated. The value of _fmode is O_TEXT by default, which specifies that files will be read in text mode. If _fmode is set to O_BINARY, the files are opened and read in binary mode. (O_TEXT and O_BINARY are defined in fcntl.h.) In text mode, carriage-return/linefeed (CR/LF) combinations are translated to a single linefeed character (LF) on input. On output, the reverse is true: LF characters are translated to CR/LF combinations. In binary mode, no such translation occurs. You can... more
_pipe | Header File io.h, fcntl.h Category Input/output Routines Syntax int _pipe(int *handles, unsigned int size, int mode); Description Creates a read/write pipe. The _pipe function creates an anonymous pipe that can be used to pass information between processes. The pipe is opened for both reading and writing. Like a disk file, a pipe can be read from and written to, but it does not have a name or permanent storage associated with it; data written to and from the pipe exist only in a memory buffer managed by the operating system. The read handle is returned to handles[0], and the write... more
open, _wopen | Header File io.h, fcntl.h Category Input/output Routines Prototype int open(const char *path, int access [, unsigned mode]); int _wopen(const wchar_t *path, int access [, unsigned mode]); Description Opens a file for reading or writing. open opens the file specified by path, then prepares it for reading and/or writing as determined by the value of access. To create a file in a particular mode, you can either assign to the global variable _fmode or call open with the O_CREAT and O_TRUNC options ORed with the translation mode desired. open("XMP",O_CREAT|O_TRUNC|O_BINARY,S_IREAD) creates a binary-mode, read-only file named XMP, truncating its length to 0... more
_sopen, _wsopen | Header File fcntl.h, sys\stat.h, share.h, io.h, stdio.h Category Input/output Routines Prototype int _sopen(char *path, int access, int shflag[, int mode]); int _wsopen(wchar_t *path, int access, int shflag[, int mode]); Description Opens a shared file. _sopen opens the file given by path and prepares it for shared reading or writing, as determined by access, shflag, and mode. _wsopen is the Unicode version of _sopen. The Unicode version accepts a filename that is a wchar_t character string. Otherwise, the functions perform identically. For _sopen, access is constructed by ORing flags bitwise from the following lists: Read/write flags You can use only one... more

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!