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_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

◆ APR_APPEND

#define APR_APPEND   APR_FOPEN_APPEND

◆ APR_BINARY

#define APR_BINARY   APR_FOPEN_BINARY

◆ APR_BUFFERED

#define APR_BUFFERED   APR_FOPEN_BUFFERED

◆ APR_CREATE

#define APR_CREATE   APR_FOPEN_CREATE

◆ APR_DELONCLOSE

#define APR_DELONCLOSE   APR_FOPEN_DELONCLOSE

◆ APR_EXCL

#define APR_EXCL   APR_FOPEN_EXCL

◆ APR_FILE_NOCLEANUP

#define APR_FILE_NOCLEANUP   APR_FOPEN_NOCLEANUP

◆ APR_FOPEN_APPEND

#define APR_FOPEN_APPEND   0x00008

Append to the end of the file

◆ APR_FOPEN_BINARY

#define APR_FOPEN_BINARY   0x00020

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

◆ APR_FOPEN_BUFFERED

#define APR_FOPEN_BUFFERED   0x00080

Open the file for buffered I/O

◆ APR_FOPEN_CREATE

#define APR_FOPEN_CREATE   0x00004

Create the file if not there

◆ APR_FOPEN_DELONCLOSE

#define APR_FOPEN_DELONCLOSE   0x00100

Delete the file after close

◆ APR_FOPEN_EXCL

#define APR_FOPEN_EXCL   0x00040

Open should fail if APR_FOPEN_CREATE and file exists.

◆ APR_FOPEN_LARGEFILE

#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.

◆ APR_FOPEN_NOCLEANUP

#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.

◆ APR_FOPEN_NONBLOCK

#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.

◆ APR_FOPEN_READ

#define APR_FOPEN_READ   0x00001

Open the file for reading

◆ APR_FOPEN_SENDFILE_ENABLED

#define APR_FOPEN_SENDFILE_ENABLED   0x01000

Advisory flag that this file should support apr_socket_sendfile operation

◆ APR_FOPEN_SHARELOCK

#define APR_FOPEN_SHARELOCK   0x00400

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

◆ APR_FOPEN_SPARSE

#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().

◆ APR_FOPEN_TRUNCATE

#define APR_FOPEN_TRUNCATE   0x00010

Open the file and truncate to 0 length

◆ APR_FOPEN_WRITE

#define APR_FOPEN_WRITE   0x00002

Open the file for writing

◆ APR_FOPEN_XTHREAD

#define APR_FOPEN_XTHREAD   0x00200

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

◆ APR_LARGEFILE

#define APR_LARGEFILE   APR_FOPEN_LARGEFILE

◆ APR_READ

#define APR_READ   APR_FOPEN_READ

◆ APR_SENDFILE_ENABLED

#define APR_SENDFILE_ENABLED   APR_FOPEN_SENDFILE_ENABLED

◆ APR_SHARELOCK

#define APR_SHARELOCK   APR_FOPEN_SHARELOCK

◆ APR_TRUNCATE

#define APR_TRUNCATE   APR_FOPEN_TRUNCATE

◆ APR_WRITE

#define APR_WRITE   APR_FOPEN_WRITE

◆ APR_XTHREAD

#define APR_XTHREAD   APR_FOPEN_XTHREAD