Apache Portable Runtime
Macros

Macros

#define APR_FOPEN_READ   0x00001
 
#define APR_FOPEN_WRITE   0x00002
 
#define APR_FOPEN_CREATE   0x00004
 
#define APR_FOPEN_APPEND   0x00008
 
#define APR_FOPEN_TRUNCATE   0x00010
 
#define APR_FOPEN_BINARY   0x00020
 
#define APR_FOPEN_EXCL   0x00040
 
#define APR_FOPEN_BUFFERED   0x00080
 
#define APR_FOPEN_DELONCLOSE   0x00100
 
#define APR_FOPEN_XTHREAD   0x00200
 
#define APR_FOPEN_SHARELOCK   0x00400
 
#define APR_FOPEN_NOCLEANUP   0x00800
 
#define APR_FOPEN_SENDFILE_ENABLED   0x01000
 
#define APR_FOPEN_LARGEFILE   0x04000
 
#define APR_FOPEN_SPARSE   0x08000
 
#define APR_FOPEN_ROTATING   0x10000
 
#define APR_FOPEN_MANUAL_ROTATE   0x20000
 
#define APR_FOPEN_NONBLOCK   0x40000
 
#define APR_READ   APR_FOPEN_READ
 
#define APR_WRITE   APR_FOPEN_WRITE
 
#define APR_CREATE   APR_FOPEN_CREATE
 
#define APR_APPEND   APR_FOPEN_APPEND
 
#define APR_TRUNCATE   APR_FOPEN_TRUNCATE
 
#define APR_BINARY   APR_FOPEN_BINARY
 
#define APR_EXCL   APR_FOPEN_EXCL
 
#define APR_BUFFERED   APR_FOPEN_BUFFERED
 
#define APR_DELONCLOSE   APR_FOPEN_DELONCLOSE
 
#define APR_XTHREAD   APR_FOPEN_XTHREAD
 
#define APR_SHARELOCK   APR_FOPEN_SHARELOCK
 
#define APR_FILE_NOCLEANUP   APR_FOPEN_NOCLEANUP
 
#define APR_SENDFILE_ENABLED   APR_FOPEN_SENDFILE_ENABLED
 
#define APR_LARGEFILE   APR_FOPEN_LARGEFILE
 

Detailed Description

Macro Definition Documentation

#define APR_APPEND   APR_FOPEN_APPEND
#define APR_BINARY   APR_FOPEN_BINARY
#define APR_BUFFERED   APR_FOPEN_BUFFERED
#define APR_CREATE   APR_FOPEN_CREATE
#define APR_DELONCLOSE   APR_FOPEN_DELONCLOSE
#define APR_EXCL   APR_FOPEN_EXCL
#define APR_FILE_NOCLEANUP   APR_FOPEN_NOCLEANUP
#define APR_FOPEN_APPEND   0x00008

Append to the end of the file

#define APR_FOPEN_BINARY   0x00020

Open the file in binary mode (This flag is ignored on UNIX because it has no meaning)

#define APR_FOPEN_BUFFERED   0x00080

Open the file for buffered I/O

#define APR_FOPEN_CREATE   0x00004

Create the file if not there

#define APR_FOPEN_DELONCLOSE   0x00100

Delete the file after close

#define APR_FOPEN_EXCL   0x00040

Open should fail if APR_FOPEN_CREATE and file exists.

#define APR_FOPEN_LARGEFILE   0x04000

Platform dependent flag to enable large file support, see WARNING below

Warning
APR_FOPEN_LARGEFILE flag only has effect on some platforms where sizeof(apr_off_t) == 4. Where implemented, it allows opening and writing to a file which exceeds the size which can be represented by apr_off_t (2 gigabytes). When a file's size does exceed 2Gb, apr_file_info_get() will fail with an error on the descriptor, likewise apr_stat()/apr_lstat() will fail on the filename. apr_dir_read() will fail with APR_INCOMPLETE on a directory entry for a large file depending on the particular APR_FINFO_* flags. Generally, it is not recommended to use this flag.
#define APR_FOPEN_MANUAL_ROTATE   0x20000

Enable Manual rotation

#define APR_FOPEN_NOCLEANUP   0x00800

Do not register a cleanup when the file is opened. The apr_os_file_t handle in apr_file_t will not be closed when the pool is destroyed.

#define APR_FOPEN_NONBLOCK   0x40000

Platform dependent flag to enable non blocking file io

Warning
APR_FOPEN_NONBLOCK is not implemented on all platforms. Callers should be prepared for it to fail with APR_ENOTIMPL.
#define APR_FOPEN_READ   0x00001

Open the file for reading

#define APR_FOPEN_ROTATING   0x10000

Do file file rotation checking

#define APR_FOPEN_SENDFILE_ENABLED   0x01000

Advisory flag that this file should support apr_socket_sendfile operation

#define APR_FOPEN_SHARELOCK   0x00400

Platform dependent support for higher level locked read/write access to support writes across process/machines

#define APR_FOPEN_SPARSE   0x08000

Platform dependent flag to enable sparse file support, see WARNING below

Warning
APR_FOPEN_SPARSE may, depending on platform, convert a normal file to a sparse file. Some applications may be unable to decipher a sparse file, so it's critical that the sparse file flag should only be used for files accessed only by APR or other applications known to be able to decipher them. APR does not guarantee that it will compress the file into sparse segments if it was previously created and written without the sparse flag. On platforms which do not understand, or on file systems which cannot handle sparse files, the flag is ignored by apr_file_open().
#define APR_FOPEN_TRUNCATE   0x00010

Open the file and truncate to 0 length

#define APR_FOPEN_WRITE   0x00002

Open the file for writing

#define APR_FOPEN_XTHREAD   0x00200

Platform dependent tag to open the file for use across multiple threads

#define APR_LARGEFILE   APR_FOPEN_LARGEFILE
#define APR_READ   APR_FOPEN_READ
#define APR_SENDFILE_ENABLED   APR_FOPEN_SENDFILE_ENABLED
#define APR_SHARELOCK   APR_FOPEN_SHARELOCK
#define APR_TRUNCATE   APR_FOPEN_TRUNCATE
#define APR_WRITE   APR_FOPEN_WRITE
#define APR_XTHREAD   APR_FOPEN_XTHREAD