Main Page | Data Structures | Directories | File List | Data Fields | Globals

lcn_directory.h File Reference

Routines for working with various types of directories. More...

#include "lcn_types.h"
#include "lcn_istream.h"
#include <apr_hash.h>
#include <apr_tables.h>
#include <apr_time.h>

Go to the source code of this file.

Typedefs

typedef lcn_directory_t lcn_directory_t
 An opaque directory object.

Functions

lcn_error_tlcn_ram_directory_open (lcn_directory_t **dir, apr_hash_t *contents, apr_pool_t *pool)
 Open a new ram-backed directory dir, allocated within pool.
lcn_error_tlcn_fs_directory_open (lcn_directory_t **dir, const char *path, apr_pool_t *pool)
 Open a new directory object dir which corresponds to the filesystem directory located at path, all allocation is done within pool.
lcn_error_tlcn_cfs_directory_open (lcn_directory_t **dir, lcn_istream_t *cfsfile, apr_pool_t *pool)
 Open an new compound file stream directory dir, using the stream cfsfile for the backing store, all allocation is done within pool.
lcn_error_tlcn_directory_list (apr_array_header_t **contents, const lcn_directory_t *d, apr_pool_t *pool)
 Return in contents a list of the files within directory d, allocated in pool.
lcn_error_tlcn_directory_file_exists (lcn_boolean_t *result, const lcn_directory_t *d, const char *name, apr_pool_t *pool)
 If file name exists in directory d return TRUE in result, otherwise return FALSE in result.
lcn_error_tlcn_directory_file_modified (apr_time_t *result, const lcn_directory_t *d, const char *name, apr_pool_t *pool)
 Return the time file name in directory d was modified in result, using pool for temporary allocations.
lcn_error_tlcn_directory_touch_file (lcn_directory_t *d, const char *name, apr_pool_t *pool)
 Update the modification time for file name in directory d, using pool for any temporary allocations.
lcn_error_tlcn_directory_delete_file (lcn_directory_t *d, const char *name, apr_pool_t *pool)
 Delete file name in directory d, using pool for any temporary allocations.
lcn_error_tlcn_directory_rename_file (lcn_directory_t *d, const char *from, const char *to, apr_pool_t *pool)
 Rename file from to to within directory d, using pool for temporary allocations.
lcn_error_tlcn_directory_open_file (lcn_istream_t **result, const lcn_directory_t *d, const char *name, apr_pool_t *pool)
 Open file name in directory d for reading, returning a corresponding stream in result, using pool for all allocation.
lcn_error_tlcn_directory_close (lcn_directory_t *d, apr_pool_t *pool)
 Close directory d, using pool for any temporary allocation.


Detailed Description

Routines for working with various types of directories.

Definition in file lcn_directory.h.


Function Documentation

lcn_error_t* lcn_directory_close lcn_directory_t d,
apr_pool_t *  pool
 

Close directory d, using pool for any temporary allocation.

Note:
This isn't strictly necessary, you can just let pool cleanups clean up the directory for you if you want.

lcn_error_t* lcn_directory_file_exists lcn_boolean_t result,
const lcn_directory_t d,
const char *  name,
apr_pool_t *  pool
 

If file name exists in directory d return TRUE in result, otherwise return FALSE in result.

pool is used for all temporary allocations.

lcn_error_t* lcn_directory_list apr_array_header_t **  contents,
const lcn_directory_t d,
apr_pool_t *  pool
 

Return in contents a list of the files within directory d, allocated in pool.

contents will contain const char * filenames.

lcn_error_t* lcn_ram_directory_open lcn_directory_t **  dir,
apr_hash_t *  contents,
apr_pool_t *  pool
 

Open a new ram-backed directory dir, allocated within pool.

contents maps from const char * filenames to pointers to lcn_directory_entry_t objects.


Generated on Sat Mar 26 08:12:11 2005 for Lucene4c by  doxygen 1.4.0