bitable
0.1
Ordered immutable key value storage system.
|
Writable file IO support. More...
#include "bitablecommon.h"
Go to the source code of this file.
Typedefs | |
typedef struct BitableWritableFile | BitableWritableFile |
Functions | |
BITABLE_API BitableResult | bitable_wf_create (BitableWritableFile **file, const char *path) |
BITABLE_API BitableResult | bitable_wf_seek (BitableWritableFile *file, int64_t position) |
BITABLE_API BitableResult | bitable_wf_write (BitableWritableFile *file, const void *data, uint32_t size) |
BITABLE_API BitableResult | bitable_wf_sync (BitableWritableFile *file) |
BITABLE_API BitableResult | bitable_wf_close (BitableWritableFile *file) |
Writable file IO support.
typedef struct BitableWritableFile BitableWritableFile |
OS specific structure for the handle information for a writable file.
BITABLE_API BitableResult bitable_wf_close | ( | BitableWritableFile * | file | ) |
Close a previously opened file.
file | The file to close. Does not null check. |
BITABLE_API BitableResult bitable_wf_create | ( | BitableWritableFile ** | file, |
const char * | path | ||
) |
Create a file for writing, allocating the handle information
[out] | file | Allocated open file handling for writing - should be closed with bitable_wf_close if this open function is successful. No null check performed. |
path | The file path to open, should be in UTF8 encoding. Does not null check. |
BITABLE_API BitableResult bitable_wf_seek | ( | BitableWritableFile * | file, |
int64_t | position | ||
) |
Seek to a position in a previously opened file relative the beginning.
file | The file to seek in. Does not null check. |
position | The position to seek to. |
BITABLE_API BitableResult bitable_wf_sync | ( | BitableWritableFile * | file | ) |
Sync a file to disk, including its metadata.
file | The file to sync. Does not null check. |
BITABLE_API BitableResult bitable_wf_write | ( | BitableWritableFile * | file, |
const void * | data, | ||
uint32_t | size | ||
) |
Write data to the current file point for a file.
file | The file to write to. Does not null check. |
data | The data to write. Does not null check. |
size | The amount of data to write in bytes. |