File Open Flags/Routines

Overview

// macros

#define APR_APPEND
#define APR_BINARY
#define APR_BUFFERED
#define APR_CREATE
#define APR_DELONCLOSE
#define APR_EXCL
#define APR_FILE_NOCLEANUP
#define APR_FOPEN_APPEND
#define APR_FOPEN_BINARY
#define APR_FOPEN_BUFFERED
#define APR_FOPEN_CREATE
#define APR_FOPEN_DELONCLOSE
#define APR_FOPEN_EXCL
#define APR_FOPEN_LARGEFILE
#define APR_FOPEN_NOCLEANUP
#define APR_FOPEN_NONBLOCK
#define APR_FOPEN_READ
#define APR_FOPEN_SENDFILE_ENABLED
#define APR_FOPEN_SHARELOCK
#define APR_FOPEN_SPARSE
#define APR_FOPEN_TRUNCATE
#define APR_FOPEN_WRITE
#define APR_FOPEN_XTHREAD
#define APR_LARGEFILE
#define APR_READ
#define APR_SENDFILE_ENABLED
#define APR_SHARELOCK
#define APR_TRUNCATE
#define APR_WRITE
#define APR_XTHREAD

Detailed Documentation

Macros

#define APR_APPEND

Deprecated

See also:

APR_FOPEN_APPEND

#define APR_BINARY

Deprecated

See also:

APR_FOPEN_BINARY

#define APR_BUFFERED

Deprecated

See also:

APR_FOPEN_BUFFERED

#define APR_CREATE

Deprecated

See also:

APR_FOPEN_CREATE

#define APR_DELONCLOSE

Deprecated

See also:

APR_FOPEN_DELONCLOSE

#define APR_EXCL

Deprecated

See also:

APR_FOPEN_EXCL

#define APR_FILE_NOCLEANUP

Deprecated

See also:

APR_FOPEN_NOCLEANUP

#define APR_FOPEN_APPEND

Append to the end of the file

#define APR_FOPEN_BINARY

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

#define APR_FOPEN_BUFFERED

Open the file for buffered I/O

#define APR_FOPEN_CREATE

Create the file if not there

#define APR_FOPEN_DELONCLOSE

Delete the file after close

#define APR_FOPEN_EXCL

Open should fail if APR_FOPEN_CREATE and file exists.

#define APR_FOPEN_LARGEFILE

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_NOCLEANUP

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

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

Open the file for reading

#define APR_FOPEN_SENDFILE_ENABLED

Advisory flag that this file should support apr_socket_sendfile operation

#define APR_FOPEN_SHARELOCK

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

#define APR_FOPEN_SPARSE

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

Open the file and truncate to 0 length

#define APR_FOPEN_WRITE

Open the file for writing

#define APR_FOPEN_XTHREAD

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

#define APR_LARGEFILE

Deprecated

See also:

APR_FOPEN_LARGEFILE

#define APR_READ

Deprecated

See also:

APR_FOPEN_READ

#define APR_SENDFILE_ENABLED

Deprecated

See also:

APR_FOPEN_SENDFILE_ENABLED

#define APR_SHARELOCK

Deprecated

See also:

APR_FOPEN_SHARELOCK

#define APR_TRUNCATE

Deprecated

See also:

APR_FOPEN_TRUNCATE

#define APR_WRITE

Deprecated

See also:

APR_FOPEN_WRITE

#define APR_XTHREAD

Deprecated

See also:

APR_FOPEN_XTHREAD