Directories Layout.
More...
Go to the source code of this file.
|
| apt_dir_layout_t * | apt_default_dir_layout_create (const char *root_dir_path, apr_pool_t *pool) |
| |
| apt_dir_layout_t * | apt_custom_dir_layout_create (const char *conf_dir_path, const char *plugin_dir_path, const char *log_dir_path, const char *data_dir_path, const char *var_dir_path, apr_pool_t *pool) |
| |
| apt_dir_layout_t * | apt_dir_layout_create (apr_pool_t *pool) |
| |
| apt_dir_layout_t * | apt_dir_layout_create_ext (apr_size_t count, apr_pool_t *pool) |
| |
| apt_bool_t | apt_dir_layout_load (apt_dir_layout_t *dir_layout, const char *config_file, apr_pool_t *pool) |
| |
| apt_bool_t | apt_dir_layout_load_ext (apt_dir_layout_t *dir_layout, const char *config_file, const char **labels, apr_size_t count, apr_pool_t *pool) |
| |
| apt_bool_t | apt_dir_layout_path_set (apt_dir_layout_t *dir_layout, apr_size_t dir_entry_id, const char *path, apr_pool_t *pool) |
| |
| const char * | apt_dir_layout_path_get (const apt_dir_layout_t *dir_layout, apr_size_t dir_entry_id) |
| |
| char * | apt_dir_layout_path_compose (const apt_dir_layout_t *dir_layout, apr_size_t dir_entry_id, const char *file_name, apr_pool_t *pool) |
| |
| char * | apt_confdir_filepath_get (const apt_dir_layout_t *dir_layout, const char *file_name, apr_pool_t *pool) |
| |
| char * | apt_datadir_filepath_get (const apt_dir_layout_t *dir_layout, const char *file_name, apr_pool_t *pool) |
| |
| char * | apt_vardir_filepath_get (const apt_dir_layout_t *dir_layout, const char *file_name, apr_pool_t *pool) |
| |
◆ apt_dir_layout_t
Directories layout declaration
◆ apt_dir_entry_id
Enumeration of directories the layout is composed of
| Enumerator |
|---|
| APT_LAYOUT_CONF_DIR | configuration directory
|
| APT_LAYOUT_PLUGIN_DIR | plugin directory
|
| APT_LAYOUT_LOG_DIR | log directory
|
| APT_LAYOUT_DATA_DIR | data directory
|
| APT_LAYOUT_VAR_DIR | var directory
|
| APT_LAYOUT_DIR_COUNT | number of directories in the default layout
|
◆ apt_confdir_filepath_get()
| char* apt_confdir_filepath_get |
( |
const apt_dir_layout_t * |
dir_layout, |
|
|
const char * |
file_name, |
|
|
apr_pool_t * |
pool |
|
) |
| |
Compose a file path relative to config dir.
- Parameters
-
| dir_layout | the directory layout |
| file_name | the file name |
| pool | the memory pool to use |
◆ apt_custom_dir_layout_create()
| apt_dir_layout_t* apt_custom_dir_layout_create |
( |
const char * |
conf_dir_path, |
|
|
const char * |
plugin_dir_path, |
|
|
const char * |
log_dir_path, |
|
|
const char * |
data_dir_path, |
|
|
const char * |
var_dir_path, |
|
|
apr_pool_t * |
pool |
|
) |
| |
Create a custom directories layout based on the specified individual directories.
- Parameters
-
| conf_dir_path | the path to the config dir |
| plugin_dir_path | the path to the plugin dir |
| log_dir_path | the path to the log dir |
| data_dir_path | the path to the data dir |
| var_dir_path | the path to the var dir |
| pool | the memory pool to use |
◆ apt_datadir_filepath_get()
| char* apt_datadir_filepath_get |
( |
const apt_dir_layout_t * |
dir_layout, |
|
|
const char * |
file_name, |
|
|
apr_pool_t * |
pool |
|
) |
| |
Compose a file path relative to data dir.
- Parameters
-
| dir_layout | the directory layout |
| file_name | the file name |
| pool | the memory pool to use |
◆ apt_default_dir_layout_create()
| apt_dir_layout_t* apt_default_dir_layout_create |
( |
const char * |
root_dir_path, |
|
|
apr_pool_t * |
pool |
|
) |
| |
Create the default directories layout based on the specified root directory.
- Parameters
-
| root_dir_path | the path to the root directory |
| pool | the memory pool to use |
◆ apt_dir_layout_create()
Create a bare directories layout.
- Parameters
-
| pool | the memory pool to use |
◆ apt_dir_layout_create_ext()
| apt_dir_layout_t* apt_dir_layout_create_ext |
( |
apr_size_t |
count, |
|
|
apr_pool_t * |
pool |
|
) |
| |
Create an extended bare directories layout.
- Parameters
-
| count | the number of directories in the layout |
| pool | the memory pool to use |
◆ apt_dir_layout_load()
Load directories layout from the specified configuration file.
- Parameters
-
| dir_layout | the directory layout |
| config_file | the path to the configuration file |
| pool | the memory pool to use |
◆ apt_dir_layout_load_ext()
| apt_bool_t apt_dir_layout_load_ext |
( |
apt_dir_layout_t * |
dir_layout, |
|
|
const char * |
config_file, |
|
|
const char ** |
labels, |
|
|
apr_size_t |
count, |
|
|
apr_pool_t * |
pool |
|
) |
| |
Load directories layout from the specified configuration file using the provided labels.
- Parameters
-
| dir_layout | the directory layout |
| config_file | the path to the configuration file |
| labels | the array of directory labels (configuration entries) |
| count | the number of labels (normally equals the number of directories in the layout) |
| pool | the memory pool to use |
◆ apt_dir_layout_path_compose()
| char* apt_dir_layout_path_compose |
( |
const apt_dir_layout_t * |
dir_layout, |
|
|
apr_size_t |
dir_entry_id, |
|
|
const char * |
file_name, |
|
|
apr_pool_t * |
pool |
|
) |
| |
Compose a file path relative to the specified directory in the layout.
- Parameters
-
| dir_layout | the directory layout |
| dir_entry_id | the directory id (apt_dir_entry_id) |
| file_name | the file name to append to the directory path |
| pool | the memory pool to use |
◆ apt_dir_layout_path_get()
| const char* apt_dir_layout_path_get |
( |
const apt_dir_layout_t * |
dir_layout, |
|
|
apr_size_t |
dir_entry_id |
|
) |
| |
Get the path to the individual directory in the layout.
- Parameters
-
| dir_layout | the directory layout |
| dir_entry_id | the directory id (apt_dir_entry_id) |
◆ apt_dir_layout_path_set()
| apt_bool_t apt_dir_layout_path_set |
( |
apt_dir_layout_t * |
dir_layout, |
|
|
apr_size_t |
dir_entry_id, |
|
|
const char * |
path, |
|
|
apr_pool_t * |
pool |
|
) |
| |
Set the path to the individual directory in the layout.
- Parameters
-
| dir_layout | the directory layout |
| dir_entry_id | the directory id (apt_dir_entry_id) |
| path | the directory path |
| pool | the memory pool to use |
◆ apt_vardir_filepath_get()
| char* apt_vardir_filepath_get |
( |
const apt_dir_layout_t * |
dir_layout, |
|
|
const char * |
file_name, |
|
|
apr_pool_t * |
pool |
|
) |
| |
Compose a file path relative to var dir.
- Parameters
-
| dir_layout | the directory layout |
| file_name | the file name |
| pool | the memory pool to use |