GME  13
Classes | Defines | Typedefs | Functions | Variables
Stat Functions
File Information
Collaboration diagram for Stat Functions:

Classes

struct  apr_finfo_t

Defines

#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 char * fname
const char apr_int32_t wanted
const char apr_int32_t apr_pool_tpool

Define Documentation

#define APR_FINFO_ATIME   0x00000040

Access Time

Definition at line 148 of file apr_file_info.h.

#define APR_FINFO_CSIZE   0x00000200

Storage size consumed by the file

Definition at line 150 of file apr_file_info.h.

#define APR_FINFO_CTIME   0x00000020

Creation or inode-changed time

Definition at line 147 of file apr_file_info.h.

#define APR_FINFO_DEV   0x00001000

Device

Definition at line 151 of file apr_file_info.h.

#define APR_FINFO_DIRENT   0x02000000

an atomic unix apr_dir_read()

Definition at line 168 of file apr_file_info.h.

#define APR_FINFO_GPROT   0x00200000

Group protection bits

Definition at line 158 of file apr_file_info.h.

#define APR_FINFO_GROUP   0x00020000

Group

Definition at line 156 of file apr_file_info.h.

#define APR_FINFO_ICASE   0x01000000

if dev is case insensitive

Definition at line 160 of file apr_file_info.h.

#define APR_FINFO_IDENT   0x00003000

dev and inode

Definition at line 164 of file apr_file_info.h.

#define APR_FINFO_INODE   0x00002000

Inode

Definition at line 152 of file apr_file_info.h.

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

#define APR_FINFO_MIN   0x00008170

type, mtime, ctime, atime, size

Definition at line 163 of file apr_file_info.h.

#define APR_FINFO_MTIME   0x00000010

Modification Time

Definition at line 146 of file apr_file_info.h.

#define APR_FINFO_NAME   0x02000000

->name in proper case

Definition at line 161 of file apr_file_info.h.

#define APR_FINFO_NLINK   0x00004000

Number of links

Definition at line 153 of file apr_file_info.h.

#define APR_FINFO_NORM   0x0073b170

an atomic unix apr_stat()

Definition at line 167 of file apr_file_info.h.

#define APR_FINFO_OWNER   0x00030000

user and group

Definition at line 165 of file apr_file_info.h.

#define APR_FINFO_PROT   0x00700000

all protections

Definition at line 166 of file apr_file_info.h.

#define APR_FINFO_SIZE   0x00000100

Size of the file

Definition at line 149 of file apr_file_info.h.

#define APR_FINFO_TYPE   0x00008000

Type

Definition at line 154 of file apr_file_info.h.

#define APR_FINFO_UPROT   0x00100000

User protection bits

Definition at line 157 of file apr_file_info.h.

#define APR_FINFO_USER   0x00010000

User

Definition at line 155 of file apr_file_info.h.

#define APR_FINFO_WPROT   0x00400000

World protection bits

Definition at line 159 of file apr_file_info.h.


Typedef Documentation

typedef struct apr_finfo_t apr_finfo_t

file info structure

Definition at line 143 of file apr_file_info.h.


Function Documentation

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 seperators (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 ambigious (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 componenta 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.

Variable Documentation

const char * fname

Definition at line 229 of file apr_file_info.h.

const char apr_pool_t* pool

Definition at line 229 of file apr_file_info.h.

apr_int32_t wanted

Definition at line 229 of file apr_file_info.h.