Loading...
Searching...
No Matches
Stat Functions
Apache Portability Runtime library » File Information
Collaboration diagram for Stat Functions:

## Data Structures

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_status_t | apr_stat (apr_finfo_t *finfo, const char *fname, apr_int32_t wanted, apr_pool_t *pool)

## Detailed Description

## Macro Definition Documentation

## APR_FINFO_ATIME

#define APR_FINFO_ATIME 0x00000040

Access Time

## APR_FINFO_CSIZE

#define APR_FINFO_CSIZE 0x00000200

Storage size consumed by the file

## APR_FINFO_CTIME

#define APR_FINFO_CTIME 0x00000020

Creation or inode-changed time

## APR_FINFO_DEV

#define APR_FINFO_DEV 0x00001000

Device

## APR_FINFO_DIRENT

#define APR_FINFO_DIRENT 0x02000000

an atomic unix apr_dir_read()

## APR_FINFO_GPROT

#define APR_FINFO_GPROT 0x00200000

Group protection bits

## APR_FINFO_GROUP

#define APR_FINFO_GROUP 0x00020000

Group

## APR_FINFO_ICASE

#define APR_FINFO_ICASE 0x01000000

if dev is case insensitive

## APR_FINFO_IDENT

#define APR_FINFO_IDENT 0x00003000

dev and inode

## APR_FINFO_INODE

#define APR_FINFO_INODE 0x00002000

Inode

## APR_FINFO_LINK

#define APR_FINFO_LINK 0x00000001

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

## APR_FINFO_MIN

#define APR_FINFO_MIN 0x00008170

type, mtime, ctime, atime, size

## APR_FINFO_MTIME

#define APR_FINFO_MTIME 0x00000010

Modification Time

## APR_FINFO_NAME

#define APR_FINFO_NAME 0x02000000

->name in proper case

## APR_FINFO_NLINK

#define APR_FINFO_NLINK 0x00004000

Number of links

## APR_FINFO_NORM

#define APR_FINFO_NORM 0x0073b170

an atomic unix apr_stat()

## APR_FINFO_OWNER

#define APR_FINFO_OWNER 0x00030000

user and group

## APR_FINFO_PROT

#define APR_FINFO_PROT 0x00700000

all protections

## APR_FINFO_SIZE

#define APR_FINFO_SIZE 0x00000100

Size of the file

## APR_FINFO_TYPE

#define APR_FINFO_TYPE 0x00008000

Type

## APR_FINFO_UPROT

#define APR_FINFO_UPROT 0x00100000

User protection bits

## APR_FINFO_USER

#define APR_FINFO_USER 0x00010000

User

## APR_FINFO_WPROT

#define APR_FINFO_WPROT 0x00400000

World protection bits

## Typedef Documentation

## apr_finfo_t

typedef struct apr_finfo_t apr_finfo_t

file info structure

## Function Documentation

## apr_stat()

apr_status_t apr_stat | ( | apr_finfo_t * | finfo,
|  | const char * | fname,
|  | apr_int32_t | wanted,
|  | apr_pool_t * | pool
| ) |  |

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

Parameters

  finfo | Where to store the information about the file, which is never touched if the call fails.
  fname | The name of the file to stat.
  wanted | The desired apr_finfo_t fields, as a bit flag of APR_FINFO_ values
  pool | the 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.