Apache HTTPD
Classes | Macros | Typedefs | Functions | Variables
Stat Functions

Classes

struct  apr_finfo_t
 

Macros

#define APR_FINFO_LINK   0x00000001
 
#define APR_FINFO_MTIME   0x00000010
 
#define APR_FINFO_CTIME   0x00000020
 
#define APR_FINFO_ATIME   0x00000040
 
#define APR_FINFO_SIZE   0x00000100
 
#define APR_FINFO_CSIZE   0x00000200
 
#define APR_FINFO_DEV   0x00001000
 
#define APR_FINFO_INODE   0x00002000
 
#define APR_FINFO_NLINK   0x00004000
 
#define APR_FINFO_TYPE   0x00008000
 
#define APR_FINFO_USER   0x00010000
 
#define APR_FINFO_GROUP   0x00020000
 
#define APR_FINFO_UPROT   0x00100000
 
#define APR_FINFO_GPROT   0x00200000
 
#define APR_FINFO_WPROT   0x00400000
 
#define APR_FINFO_ICASE   0x01000000
 
#define APR_FINFO_NAME   0x02000000
 
#define APR_FINFO_MIN   0x00008170
 
#define APR_FINFO_IDENT   0x00003000
 
#define APR_FINFO_OWNER   0x00030000
 
#define APR_FINFO_PROT   0x00700000
 
#define APR_FINFO_NORM   0x0073b170
 
#define APR_FINFO_DIRENT   0x02000000
 

Typedefs

typedef struct apr_finfo_t apr_finfo_t
 

Functions

 APR_DECLARE (apr_status_t) apr_stat(apr_finfo_t *finfo
 

Variables

const charfname
 
const char apr_int32_t wanted
 
const char apr_int32_t apr_pool_tpool
 

Detailed Description

Macro Definition Documentation

◆ APR_FINFO_ATIME

#define APR_FINFO_ATIME   0x00000040

Access Time

Definition at line 148 of file apr_file_info.h.

◆ APR_FINFO_CSIZE

#define APR_FINFO_CSIZE   0x00000200

Storage size consumed by the file

Definition at line 150 of file apr_file_info.h.

◆ APR_FINFO_CTIME

#define APR_FINFO_CTIME   0x00000020

Creation or inode-changed time

Definition at line 147 of file apr_file_info.h.

◆ APR_FINFO_DEV

#define APR_FINFO_DEV   0x00001000

Device

Definition at line 151 of file apr_file_info.h.

◆ APR_FINFO_DIRENT

#define APR_FINFO_DIRENT   0x02000000

an atomic unix apr_dir_read()

Definition at line 168 of file apr_file_info.h.

◆ APR_FINFO_GPROT

#define APR_FINFO_GPROT   0x00200000

Group protection bits

Definition at line 158 of file apr_file_info.h.

◆ APR_FINFO_GROUP

#define APR_FINFO_GROUP   0x00020000

Group

Definition at line 156 of file apr_file_info.h.

◆ APR_FINFO_ICASE

#define APR_FINFO_ICASE   0x01000000

if dev is case insensitive

Definition at line 160 of file apr_file_info.h.

◆ APR_FINFO_IDENT

#define APR_FINFO_IDENT   0x00003000

dev and inode

Definition at line 164 of file apr_file_info.h.

◆ APR_FINFO_INODE

#define APR_FINFO_INODE   0x00002000

Inode

Definition at line 152 of file apr_file_info.h.

◆ APR_FINFO_LINK

#define APR_FINFO_LINK   0x00000001

Stat the link not the file itself if it is a link

Definition at line 145 of file apr_file_info.h.

◆ APR_FINFO_MIN

#define APR_FINFO_MIN   0x00008170

type, mtime, ctime, atime, size

Definition at line 163 of file apr_file_info.h.

◆ APR_FINFO_MTIME

#define APR_FINFO_MTIME   0x00000010

Modification Time

Definition at line 146 of file apr_file_info.h.

◆ APR_FINFO_NAME

#define APR_FINFO_NAME   0x02000000

->name in proper case

Definition at line 161 of file apr_file_info.h.

◆ APR_FINFO_NLINK

#define APR_FINFO_NLINK   0x00004000

Number of links

Definition at line 153 of file apr_file_info.h.

◆ APR_FINFO_NORM

#define APR_FINFO_NORM   0x0073b170

an atomic unix apr_stat()

Definition at line 167 of file apr_file_info.h.

◆ APR_FINFO_OWNER

#define APR_FINFO_OWNER   0x00030000

user and group

Definition at line 165 of file apr_file_info.h.

◆ APR_FINFO_PROT

#define APR_FINFO_PROT   0x00700000

all protections

Definition at line 166 of file apr_file_info.h.

◆ APR_FINFO_SIZE

#define APR_FINFO_SIZE   0x00000100

Size of the file

Definition at line 149 of file apr_file_info.h.

◆ APR_FINFO_TYPE

#define APR_FINFO_TYPE   0x00008000

Type

Definition at line 154 of file apr_file_info.h.

◆ APR_FINFO_UPROT

#define APR_FINFO_UPROT   0x00100000

User protection bits

Definition at line 157 of file apr_file_info.h.

◆ APR_FINFO_USER

#define APR_FINFO_USER   0x00010000

User

Definition at line 155 of file apr_file_info.h.

◆ APR_FINFO_WPROT

#define APR_FINFO_WPROT   0x00400000

World protection bits

Definition at line 159 of file apr_file_info.h.

Typedef Documentation

◆ apr_finfo_t

file info structure

Definition at line 143 of file apr_file_info.h.

Function Documentation

◆ APR_DECLARE()

APR_DECLARE ( apr_status_t  )

get the specified file's stats. The file is specified by filename, instead of using a pre-opened file.

Parameters
finfoWhere to store the information about the file, which is never touched if the call fails.
fnameThe name of the file to stat.
wantedThe desired apr_finfo_t fields, as a bit flag of APR_FINFO_ values
poolthe pool to use to allocate the new file.
Note
If APR_INCOMPLETE is returned all the fields in finfo may not be filled in, and you need to check the finfo->valid bitmask to verify that what you're looking for is there.

Open the specified directory.

Parameters
new_dirThe opened directory descriptor.
dirnameThe full path to the directory (use / on all systems)
poolThe pool to use.

close the specified directory.

Parameters
thedirthe directory descriptor to close.

Read the next entry from the specified directory.

Parameters
finfothe file info structure and filled in by apr_dir_read
wantedThe desired apr_finfo_t fields, as a bit flag of APR_FINFO_ values
thedirthe directory descriptor returned from apr_dir_open
Remarks
No ordering is guaranteed for the entries read.
Note
If APR_INCOMPLETE is returned all the fields in finfo may not be filled in, and you need to check the finfo->valid bitmask to verify that what you're looking for is there. When no more entries are available, APR_ENOENT is returned.

Rewind the directory to the first entry.

Parameters
thedirthe directory descriptor to rewind.

Extract the rootpath from the given filepath

Parameters
rootpaththe root file path returned with APR_SUCCESS or APR_EINCOMPLETE
filepaththe pathname to parse for its root component
flagsthe desired rules to apply, from
     APR_FILEPATH_NATIVE    Use native path separators (e.g. '\' on Win32)
     APR_FILEPATH_TRUENAME  Tests that the root exists, and makes it proper
pthe pool to allocate the new path string from
Remarks
on return, filepath points to the first non-root character in the given filepath. In the simplest example, given a filepath of "/foo", returns the rootpath of "/" and filepath points at "foo". This is far more complex on other platforms, which will canonicalize the root form to a consistant format, given the APR_FILEPATH_TRUENAME flag, and also test for the validity of that root (e.g., that a drive d:/ or network share //machine/foovol/). The function returns APR_ERELATIVE if filepath isn't rooted (an error), APR_EINCOMPLETE if the root path is ambiguous (but potentially legitimate, e.g. "/" on Windows is incomplete because it doesn't specify the drive letter), or APR_EBADPATH if the root is simply invalid. APR_SUCCESS is returned if filepath is an absolute path.

Merge additional file path onto the previously processed rootpath

Parameters
newpaththe merged paths returned
rootpaththe root file path (NULL uses the current working path)
addpaththe path to add to the root path
flagsthe desired APR_FILEPATH_ rules to apply when merging
pthe pool to allocate the new path string from
Remarks
if the flag APR_FILEPATH_TRUENAME is given, and the addpath contains wildcard characters ('*', '?') on platforms that don't support such characters within filenames, the paths will be merged, but the result code will be APR_EPATHWILD, and all further segments will not reflect the true filenames including the wildcard and following segments.

Split a search path into separate components

Parameters
patheltsthe returned components of the search path
liststrthe search path (e.g., getenv("PATH"))
pthe pool to allocate the array and path components from
Remarks
empty path components do not become part of pathelts.
the path separator in liststr is system specific; e.g., ':' on Unix, ';' on Windows, etc.

Merge a list of search path components into a single search path

Parameters
liststrthe returned search path; may be NULL if pathelts is empty
patheltsthe components of the search path
pthe pool to allocate the search path from
Remarks
emtpy strings in the source array are ignored.
the path separator in liststr is system specific; e.g., ':' on Unix, ';' on Windows, etc.

Return the default file path (for relative file names)

Parameters
paththe default path string returned
flagsoptional flag APR_FILEPATH_NATIVE to retrieve the default file path in os-native format.
pthe pool to allocate the default path string from

Set the default file path (for relative file names)

Parameters
paththe default path returned
pthe pool to allocate any working storage

Determine the encoding used internally by the FilePath functions

Parameters
stylepoints to a variable which receives the encoding style flag
pthe pool to allocate any working storage
Remarks
Use apr_os_locale_encoding() and/or apr_os_default_encoding() to get the name of the path encoding if it's not UTF-8.

< File is read-only

< File is executable

< all protections

< File is read-only

< File is read-only

< Write by user

<

Deprecated:
See also
APR_FPROT_UWRITE

< Write by group

<

Deprecated:
See also
APR_FPROT_GWRITE

< Write by others

<

Deprecated:
See also
APR_FPROT_WWRITE

< Write by user

<

Deprecated:
See also
APR_FPROT_UWRITE

< Write by group

<

Deprecated:
See also
APR_FPROT_GWRITE

< Write by others

<

Deprecated:
See also
APR_FPROT_WWRITE

< File is executable

< File is executable

< Execute by user

<

Deprecated:
See also
APR_FPROT_UEXECUTE

< Execute by group

<

Deprecated:
See also
APR_FPROT_GEXECUTE

< Execute by others

<

Deprecated:
See also
APR_FPROT_WEXECUTE

< Execute by user

<

Deprecated:
See also
APR_FPROT_UEXECUTE

< Execute by group

<

Deprecated:
See also
APR_FPROT_GEXECUTE

< Execute by others

<

Deprecated:
See also
APR_FPROT_WEXECUTE

< Stat the link not the file itself if it is a link

< Stat the link not the file itself if it is a link

< ->name in proper case

< ->name in proper case

< Access Time

< Create the file if not there

< Open the file for reading

< Open the file for writing

< Delete the file after close

< Open should fail if APR_FOPEN_CREATE and file exists.

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

< Read by user

<

Deprecated:
See also
APR_FPROT_UREAD

< Write by user

<

Deprecated:
See also
APR_FPROT_UWRITE

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

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

< ->name in proper case

< Modification Time

< Access Time

< Creation or inode-changed time

< Type

< Size of the file

< Storage size consumed by the file

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

< ->name in proper case

< ->name in proper case

< Type

< all protections

< ->name in proper case

< ->name in proper case

< File is read-only

< File is hidden

< File is read-only

< File is read-only

< File is hidden

< File is hidden

< Platform dependent flag to enable * non blocking file io

< Open the file for reading

< Open the file for writing

< Open the file for reading

< Open the file for writing

< Open the file for buffered I/O

< Create the file if not there

< Open should fail if APR_FOPEN_CREATE and file exists.

< Open the file and truncate to 0 length

< Open should fail if APR_FOPEN_CREATE and file exists.

< Create the file if not there

< Open the file and truncate to 0 length

< Append to the end of the file

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

< Delete the file after close

< Open the file for buffered I/O

< Open the file for writing

< Open the file for writing

< Open the file for reading

< Append to the end of the file

< an atomic unix apr_stat()

< Open the file for writing

< Create the file if not there

< Open the file and truncate to 0 length

< Open the file for writing

< Create the file if not there

< Append to the end of the file

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

< File is read-only

< File is executable

< all protections

< File is read-only

< File is read-only

< Write by user

<

Deprecated:
See also
APR_FPROT_UWRITE

< Write by group

<

Deprecated:
See also
APR_FPROT_GWRITE

< Write by others

<

Deprecated:
See also
APR_FPROT_WWRITE

< Write by user

<

Deprecated:
See also
APR_FPROT_UWRITE

< Write by group

<

Deprecated:
See also
APR_FPROT_GWRITE

< Write by others

<

Deprecated:
See also
APR_FPROT_WWRITE

< File is executable

< File is executable

< Execute by user

<

Deprecated:
See also
APR_FPROT_UEXECUTE

< Execute by group

<

Deprecated:
See also
APR_FPROT_GEXECUTE

< Execute by others

<

Deprecated:
See also
APR_FPROT_WEXECUTE

< Execute by user

<

Deprecated:
See also
APR_FPROT_UEXECUTE

< Execute by group

<

Deprecated:
See also
APR_FPROT_GEXECUTE

< Execute by others

<

Deprecated:
See also
APR_FPROT_WEXECUTE

< Access Time

< Stat the link not the file itself if it is a link

< Stat the link not the file itself if it is a link

< Stat the link not the file itself if it is a link

< Create the file if not there

< Open the file for reading

< Open the file for writing

< Open should fail if APR_FOPEN_CREATE and file exists.

< Delete the file after close

< Open the file for reading

< Open the file for writing

< Open the file for reading

< Open the file for writing

< Create the file if not there

< Open should fail if APR_FOPEN_CREATE and file exists.

< Open should fail if APR_FOPEN_CREATE and file exists.

< Create the file if not there

< Append to the end of the file

< Open the file and truncate to 0 length

< Platform dependent flag to enable * non blocking file io

< use OS's default permissions

<

Deprecated:
See also
APR_FPROT_OS_DEFAULT

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

< Open the file for buffered I/O

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

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

< Open the file for buffered I/O

< Open the file for writing

< Open the file for writing

< Open the file for reading

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

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

The problem with trying to output the entire iovec is that we cannot maintain the behaviour that a real writev would have. If we iterate over the iovec one at a time, we lose the atomic properties of writev(). The other option is to combine the entire iovec into one buffer that we could then send in one call to write(). This is not reasonable since we do not know how much data an iovec could contain.

The only reasonable option, that maintains the semantics of a real writev(), is to only write the first iovec. Callers of file_writev() must deal with partial writes as they normally would. If you want to ensure an entire iovec is written, use apr_file_writev_full().

< ->name in proper case

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

< Size of the file

< Size of the file

< dev and inode

< Number of links

< ->name in proper case

< Type

< Type

< ->name in proper case

< File is read-only

< File is hidden

< File is read-only

< File is read-only

< File is hidden

< File is hidden

< Open the file for reading

< use OS's default permissions

<

Deprecated:
See also
APR_FPROT_OS_DEFAULT

< Platform dependent flag to enable * non blocking file io

< Open the file for reading

< Open the file for writing

< Create the file if not there

< Open should fail if APR_FOPEN_CREATE and file exists.

< Open the file and truncate to 0 length

< Open the file and truncate to 0 length

< Open should fail if APR_FOPEN_CREATE and file exists.

< Create the file if not there

< Delete the file after close

< Open the file for reading

< Open the file for writing

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

< Append to the end of the file

< Open the file for buffered I/O

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

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

< Append to the end of the file

< Open the file for buffered I/O

< Open the file for writing

< Open the file for writing

< Open the file for reading

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

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

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

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

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

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

< Exclusive lock. Only one process may hold an exclusive lock at any given time. This is analogous to a "write lock".

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

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

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

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

< Size of the file

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

< Size of the file

Definition at line 74 of file apr_atomic.c.

Variable Documentation

◆ fname

const char* fname

Definition at line 229 of file apr_file_info.h.

◆ pool

Definition at line 230 of file apr_file_info.h.

◆ wanted

apr_int32_t wanted

Definition at line 230 of file apr_file_info.h.