|
eaarl-io
1.0.1+71abbd4
EAARL Input/Output Library (Public API)
|
File-based implementations for interfaces. More...
#include "eaarlio/error.h"#include "eaarlio/flight.h"#include "eaarlio/memory.h"#include "eaarlio/stream.h"#include "eaarlio/tld_opener.h"Go to the source code of this file.
Functions | |
| eaarlio_error | eaarlio_file_flight (struct eaarlio_flight *flight, char const *edb_file, char const *tld_path, struct eaarlio_memory *memory) |
| Open an eaarlio_flight using normal files. More... | |
| eaarlio_error | eaarlio_file_stream (struct eaarlio_stream *stream, char const *fn, char const *mode) |
| Open a stream for a normal file. More... | |
| eaarlio_error | eaarlio_file_tld_opener (struct eaarlio_tld_opener *tld_opener, char const *tld_path, struct eaarlio_memory *memory) |
| Open a tld_opener using normal files. More... | |
File-based implementations for interfaces.
The library has three generalized interfaces to decouple it from direct file access. This header provides implementations of those interfaces for working with normal files.
| eaarlio_error eaarlio_file_flight | ( | struct eaarlio_flight * | flight, |
| char const * | edb_file, | ||
| char const * | tld_path, | ||
| struct eaarlio_memory * | memory | ||
| ) |
Open an eaarlio_flight using normal files.
| [out] | flight | Pointer to flight to be populated |
| [in] | edb_file | Path to the EDB file to load |
| [in] | tld_path | Path where the associated TLD files are located |
| [in] | memory | Memory handler, or NULL for stdlib |
Anything from eaarlio_file_stream Anything from eaarlio_edb_read Anything from stream.close Anything from eaarlio_file_tld_opener Anything from eaarlio_flight_init
| eaarlio_error eaarlio_file_stream | ( | struct eaarlio_stream * | stream, |
| char const * | fn, | ||
| char const * | mode | ||
| ) |
Open a stream for a normal file.
This opens a binary file and configures stream to access it using the C standard library file functionality (<stdio.h>).
Parameters fn and mode are passed directly to fopen.
| stream | Stream to open the file with |
| fn | Path to file to open |
| mode | Mode to open the file as |
| eaarlio_error eaarlio_file_tld_opener | ( | struct eaarlio_tld_opener * | tld_opener, |
| char const * | tld_path, | ||
| struct eaarlio_memory * | memory | ||
| ) |
Open a tld_opener using normal files.
1.8.13