|
file | afw_file.h |
| Header file for Adaptive Framework file support.
|
|
|
enum | afw_file_mode_e { afw_file_mode_read
, afw_file_mode_write
, afw_file_mode_write_new
, afw_file_mode_write_existing
} |
|
|
const afw_utf8_t * | afw_file_insure_full_path (const afw_utf8_t *path, const afw_pool_t *p, afw_xctx_t *xctx) |
| Return full file path. More...
|
|
const afw_adaptor_factory_t * | afw_file_adaptor_factory_get () |
| Get the factory for file adaptor. More...
|
|
const afw_adaptor_t * | afw_file_adaptor_create_cede_p (const afw_object_t *properties, const afw_pool_t *p, afw_xctx_t *xctx) |
| Create a file adaptor. More...
|
|
const afw_memory_t * | afw_file_to_memory (const afw_utf8_t *file_path, apr_size_t file_size, const afw_pool_t *p, afw_xctx_t *xctx) |
| Read a file into a memory in a specifed pool. More...
|
|
void | afw_file_from_memory (const afw_utf8_t *file_path, const afw_memory_t *from_memory, afw_file_mode_t mode, afw_xctx_t *xctx) |
| Write a file from a memory. More...
|
|
void | afw_file_delete (const afw_utf8_t *file_path, afw_xctx_t *xctx) |
| Delete file. More...
|
|
Adaptive Framework adaptor for storing objects in file system.
◆ afw_file_mode_t
◆ afw_file_mode_e
◆ afw_file_adaptor_create_cede_p()
Create a file adaptor.
- Parameters
-
properties | configuration. |
p | to use for adaptor resources. |
xctx | of caller. |
- Returns
- New instance of file adaptor.
Definition at line 285 of file afw_file.c.
◆ afw_file_adaptor_factory_get()
Get the factory for file adaptor.
- Returns
- factory singleton instance.
Definition at line 261 of file afw_file.c.
◆ afw_file_delete()
Delete file.
- Parameters
-
file_path | file path |
xctx | of caller. |
◆ afw_file_from_memory()
Write a file from a memory.
- Parameters
-
file_path | file path |
xctx | of caller. |
- Returns
- value
Definition at line 136 of file afw_file.c.
◆ afw_file_insure_full_path()
Return full file path.
- Parameters
-
path | is a full or relative path. |
p | to use for adaptor resources. |
xctx | of caller. |
- Returns
- full path.
The current working directory will be prepended if path is a relative path.
Definition at line 40 of file afw_file.c.
◆ afw_file_to_memory()
Read a file into a memory in a specifed pool.
- Parameters
-
file_path | file path |
file_size | size of file if already known or 0. |
p | Pool for memory. |
xctx | of caller. |
- Returns
- value
Definition at line 71 of file afw_file.c.