#include "any.h"
#include "dmlite.h"
Include dependency graph for io.h:

Go to the source code of this file.
Typedefs | |
| typedef dmlite_fd | dmlite_fd |
Functions | |
| dmlite_fd * | dmlite_fopen (dmlite_context *context, const char *path, int flags, const dmlite_any_dict *extra) |
| Opens a file. | |
| int | dmlite_fclose (dmlite_fd *fd) |
| Closes a file. | |
| int | dmlite_fseek (dmlite_fd *fd, long offset, int whence) |
| Sets the file position. | |
| long | dmlite_ftell (dmlite_fd *fd) |
| Returns the cursor position. | |
| size_t | dmlite_fread (dmlite_fd *fd, void *buffer, size_t count) |
| Reads from a file. | |
| size_t | dmlite_fwrite (dmlite_fd *fd, const void *buffer, size_t count) |
| Writes to a file. | |
| int | dmlite_feof (dmlite_fd *fd) |
| Returns 1 if EOF. | |
| int | dmlite_donewriting (dmlite_context *context, const char *pfn, const dmlite_any_dict *extra) |
| Finishes a PUT. | |
| int dmlite_donewriting | ( | dmlite_context * | context, | |
| const char * | pfn, | |||
| const dmlite_any_dict * | extra | |||
| ) |
Finishes a PUT.
| context | The DM context. | |
| pfn | The replica file name. | |
| extra | The extra parameters as returned by dmlite_put. |
| int dmlite_fclose | ( | dmlite_fd * | fd | ) |
Closes a file.
| fd | The file descriptor as returned by dmlite_open. |
| int dmlite_feof | ( | dmlite_fd * | fd | ) |
Returns 1 if EOF.
| fd | The file descriptor. |
| dmlite_fd* dmlite_fopen | ( | dmlite_context * | context, | |
| const char * | path, | |||
| int | flags, | |||
| const dmlite_any_dict * | extra | |||
| ) |
Opens a file.
| context | The DM context. | |
| path | The path to open. | |
| flags | See open() | |
| extra | The key-value pairs. |
| size_t dmlite_fread | ( | dmlite_fd * | fd, | |
| void * | buffer, | |||
| size_t | count | |||
| ) |
Reads from a file.
| fd | The file descriptor. | |
| buffer | Where to put the data. | |
| count | Number of bytes to read. |
| int dmlite_fseek | ( | dmlite_fd * | fd, | |
| long | offset, | |||
| int | whence | |||
| ) |
Sets the file position.
| fd | The file descriptor. | |
| offset | The offset. | |
| whence | See fseek() |
| long dmlite_ftell | ( | dmlite_fd * | fd | ) |
Returns the cursor position.
| fd | The file descriptor. |
| size_t dmlite_fwrite | ( | dmlite_fd * | fd, | |
| const void * | buffer, | |||
| size_t | count | |||
| ) |
Writes to a file.
| fd | The file descriptor. | |
| buffer | A pointer to the data. | |
| count | Number of bytes to write. |
1.4.7