apr  1.7.0
About: APR (Apache Portable Runtime) project offers software libraries that provide a predictable and consistent interface to underlying platform-specific implementations (APR core library).
  Fossies Dox: apr-1.7.0.tar.bz2  ("inofficial" and yet experimental doxygen-generated source code documentation)  

dir.c File Reference
#include "apr_arch_file_io.h"
#include "apr_strings.h"
#include "apr_portable.h"
Include dependency graph for dir.c:

Go to the source code of this file.

Macros

#define NAME_MAX   255
 
#define PATH_SEPARATOR   '/'
 

Functions

static apr_status_t dir_cleanup (void *thedir)
 
static const char * path_canonicalize (const char *path, apr_pool_t *pool)
 
static char * path_remove_last_component (const char *path, apr_pool_t *pool)
 
apr_status_t apr_dir_open (apr_dir_t **new, const char *dirname, apr_pool_t *pool)
 
apr_status_t apr_dir_close (apr_dir_t *thedir)
 
apr_status_t apr_dir_read (apr_finfo_t *finfo, apr_int32_t wanted, apr_dir_t *thedir)
 
apr_status_t apr_dir_rewind (apr_dir_t *thedir)
 
apr_status_t apr_dir_make (const char *path, apr_fileperms_t perm, apr_pool_t *pool)
 
apr_status_t apr_dir_make_recursive (const char *path, apr_fileperms_t perm, apr_pool_t *pool)
 
apr_status_t apr_dir_remove (const char *path, apr_pool_t *pool)
 
apr_status_t apr_os_dir_get (apr_os_dir_t **thedir, apr_dir_t *dir)
 
apr_status_t apr_os_dir_put (apr_dir_t **dir, apr_os_dir_t *thedir, apr_pool_t *pool)
 

Macro Definition Documentation

◆ NAME_MAX

#define NAME_MAX   255

Definition at line 28 of file dir.c.

◆ PATH_SEPARATOR

#define PATH_SEPARATOR   '/'

Definition at line 42 of file dir.c.

Function Documentation

◆ apr_dir_close()

apr_status_t apr_dir_close ( apr_dir_t thedir)

Definition at line 109 of file dir.c.

References dir_cleanup(), apr_dir_t::pool, and thedir.

Referenced by dir_cleanup().

◆ apr_dir_make()

apr_status_t apr_dir_make ( const char *  path,
apr_fileperms_t  perm,
apr_pool_t pool 
)

Definition at line 297 of file dir.c.

References APR_SUCCESS, apr_unix_perms2mode(), path, and perm.

Referenced by apr_dir_make_recursive(), and dir_make_parent().

◆ apr_dir_make_recursive()

apr_status_t apr_dir_make_recursive ( const char *  path,
apr_fileperms_t  perm,
apr_pool_t pool 
)

◆ apr_dir_open()

apr_status_t apr_dir_open ( apr_dir_t **  new,
const char *  dirname,
apr_pool_t pool 
)

Definition at line 75 of file dir.c.

References apr_pcalloc, APR_SUCCESS, dir, dir_cleanup(), dirname, apr_dir_t::entry, NAME_MAX, and pool.

◆ apr_dir_read()

◆ apr_dir_remove()

apr_status_t apr_dir_remove ( const char *  path,
apr_pool_t pool 
)

Definition at line 343 of file dir.c.

References APR_SUCCESS, and path.

◆ apr_dir_rewind()

apr_status_t apr_dir_rewind ( apr_dir_t thedir)

Definition at line 291 of file dir.c.

References APR_SUCCESS, apr_dir_t::dirstruct, and thedir.

◆ apr_os_dir_get()

apr_status_t apr_os_dir_get ( apr_os_dir_t **  thedir,
apr_dir_t dir 
)

Definition at line 353 of file dir.c.

References APR_ENODIR, APR_SUCCESS, dir, apr_dir_t::dirstruct, and thedir.

◆ apr_os_dir_put()

apr_status_t apr_os_dir_put ( apr_dir_t **  dir,
apr_os_dir_t thedir,
apr_pool_t pool 
)

Definition at line 362 of file dir.c.

References apr_pcalloc, APR_SUCCESS, dir, pool, and thedir.

◆ dir_cleanup()

static apr_status_t dir_cleanup ( void *  thedir)
static

Definition at line 31 of file dir.c.

References APR_SUCCESS, dir, apr_dir_t::dirstruct, and thedir.

Referenced by apr_dir_close(), and apr_dir_open().

◆ path_canonicalize()

static const char* path_canonicalize ( const char *  path,
apr_pool_t pool 
)
static

Definition at line 45 of file dir.c.

References len, path, PATH_SEPARATOR, and pool.

Referenced by path_remove_last_component().

◆ path_remove_last_component()

static char* path_remove_last_component ( const char *  path,
apr_pool_t pool 
)
static

Definition at line 62 of file dir.c.

References path, path_canonicalize(), PATH_SEPARATOR, and pool.

Referenced by apr_dir_make_recursive().