|
nany
|
Adapter for a filesystem. More...
#include <nany.h>
Public Attributes | |
| void * | internal |
| void * | invalid_fd |
| nyio_type_t(* | stat )(nyio_adapter_t *, const char *path, uint32_t len) |
| nyio_type_t(* | statex )(nyio_adapter_t *, const char *path, uint32_t len, uint64_t *size, int64_t *modified) |
| uint64_t(* | file_read )(void *, void *buffer, uint64_t bufsize) |
| uint64_t(* | file_write )(void *, const void *buffer, uint64_t bufsize) |
| void *(* | file_open )(nyio_adapter_t *, const char *path, uint32_t len, nybool_t readm, nybool_t writem, nybool_t appendm, nybool_t truncm) |
| void(* | file_close )(void *) |
| nybool_t(* | file_eof )(void *) |
| nyio_err_t(* | file_seek )(void *, uint64_t offset) |
| nyio_err_t(* | file_seek_from_end )(void *, int64_t offset) |
| nyio_err_t(* | file_seek_cur )(void *, int64_t offset) |
| uint64_t(* | file_tell )(void *) |
| void(* | file_flush )(void *) |
| uint64_t(* | file_size )(nyio_adapter_t *, const char *path, uint32_t len) |
| nyio_err_t(* | file_erase )(nyio_adapter_t *, const char *path, uint32_t len) |
| nyio_err_t(* | file_exists )(nyio_adapter_t *, const char *path, uint32_t len) |
| nyio_err_t(* | file_resize )(nyio_adapter_t *, const char *path, uint32_t len, uint64_t newsize) |
| nyio_err_t(* | file_get_contents )(nyio_adapter_t *, char **content, uint64_t *size, uint64_t *capacity, const char *path, uint32_t len) |
| nyio_err_t(* | file_set_contents )(nyio_adapter_t *, const char *path, uint32_t len, const char *content, uint32_t ctlen) |
| nyio_err_t(* | file_append_contents )(nyio_adapter_t *, const char *path, uint32_t len, const char *content, uint32_t ctlen) |
| nyio_err_t(* | folder_create )(nyio_adapter_t *, const char *path, uint32_t len) |
| nyio_err_t(* | folder_erase )(nyio_adapter_t *, const char *path, uint32_t len) |
| nyio_err_t(* | folder_clear )(nyio_adapter_t *, const char *path, uint32_t len) |
| uint64_t(* | folder_size )(nyio_adapter_t *, const char *path, uint32_t len) |
| nyio_err_t(* | folder_exists )(nyio_adapter_t *, const char *path, uint32_t len) |
| nyio_iterator_t *(* | folder_iterate )(nyio_adapter_t *, const char *path, uint32_t len, nybool_t recursive, nybool_t files, nybool_t folders) |
| nyio_iterator_t *(* | folder_next )(nyio_iterator_t *) |
| const char *(* | folder_iterator_fullpath )(nyio_adapter_t *, nyio_iterator_t *) |
| const char *(* | folder_iterator_name )(nyio_iterator_t *) |
| uint64_t(* | folder_iterator_size )(nyio_iterator_t *) |
| nyio_type_t(* | folder_iterator_type )(nyio_iterator_t *) |
| void(* | folder_iterator_close )(nyio_iterator_t *) |
| void(* | clone )(nyio_adapter_t *parent, nyio_adapter_t *dst) |
| void(* | release )(nyio_adapter_t *) |
Adapter for a filesystem.
| void(* nyio_adapter_t::clone) (nyio_adapter_t *parent, nyio_adapter_t *dst) |
Clone the adapter, most likely for a new thread
| nyio_err_t(* nyio_adapter_t::file_append_contents) (nyio_adapter_t *, const char *path, uint32_t len, const char *content, uint32_t ctlen) |
Append the content to a file
| void(* nyio_adapter_t::file_close) (void *) |
Close a file
| nybool_t(* nyio_adapter_t::file_eof) (void *) |
End of file
| nyio_err_t(* nyio_adapter_t::file_erase) (nyio_adapter_t *, const char *path, uint32_t len) |
Get the file size or the folder size (in bytes)
| nyio_err_t(* nyio_adapter_t::file_exists) (nyio_adapter_t *, const char *path, uint32_t len) |
Get if a file exists
| void(* nyio_adapter_t::file_flush) (void *) |
Flush a file
| nyio_err_t(* nyio_adapter_t::file_get_contents) (nyio_adapter_t *, char **content, uint64_t *size, uint64_t *capacity, const char *path, uint32_t len) |
Retrieve the content of a file
| void*(* nyio_adapter_t::file_open) (nyio_adapter_t *, const char *path, uint32_t len, nybool_t readm, nybool_t writem, nybool_t appendm, nybool_t truncm) |
Open a local file for the current thread
| uint64_t(* nyio_adapter_t::file_read) (void *, void *buffer, uint64_t bufsize) |
Read content from a file
| nyio_err_t(* nyio_adapter_t::file_resize) (nyio_adapter_t *, const char *path, uint32_t len, uint64_t newsize) |
Resize a file
| nyio_err_t(* nyio_adapter_t::file_seek) (void *, uint64_t offset) |
Seek from the begining of the file
| nyio_err_t(* nyio_adapter_t::file_seek_cur) (void *, int64_t offset) |
Seek from the current cursor position
| nyio_err_t(* nyio_adapter_t::file_seek_from_end) (void *, int64_t offset) |
Seek from the end of the file
| nyio_err_t(* nyio_adapter_t::file_set_contents) (nyio_adapter_t *, const char *path, uint32_t len, const char *content, uint32_t ctlen) |
Set the content of a file
| uint64_t(* nyio_adapter_t::file_size) (nyio_adapter_t *, const char *path, uint32_t len) |
Get the file size or the folder size (in bytes)
| uint64_t(* nyio_adapter_t::file_tell) (void *) |
Tell the current cursor position
| uint64_t(* nyio_adapter_t::file_write) (void *, const void *buffer, uint64_t bufsize) |
Write content to an opened file
| nyio_err_t(* nyio_adapter_t::folder_clear) (nyio_adapter_t *, const char *path, uint32_t len) |
Delete the contents of a folder
| nyio_err_t(* nyio_adapter_t::folder_create) (nyio_adapter_t *, const char *path, uint32_t len) |
Create a new folder
| nyio_err_t(* nyio_adapter_t::folder_erase) (nyio_adapter_t *, const char *path, uint32_t len) |
Delete a folder and all its content
| nyio_err_t(* nyio_adapter_t::folder_exists) (nyio_adapter_t *, const char *path, uint32_t len) |
Get if a folder exists
| nyio_iterator_t*(* nyio_adapter_t::folder_iterate) (nyio_adapter_t *, const char *path, uint32_t len, nybool_t recursive, nybool_t files, nybool_t folders) |
Iterate through folder
| void(* nyio_adapter_t::folder_iterator_close) (nyio_iterator_t *) |
Close an iterator
| const char*(* nyio_adapter_t::folder_iterator_fullpath) (nyio_adapter_t *, nyio_iterator_t *) |
Get the full path (i.e. /baz/foo,txt) of the current element
| const char*(* nyio_adapter_t::folder_iterator_name) (nyio_iterator_t *) |
Get the filename (i.e. foo.txt) of the current element
| uint64_t(* nyio_adapter_t::folder_iterator_size) (nyio_iterator_t *) |
Get the size in bytes of the current element
| nyio_type_t(* nyio_adapter_t::folder_iterator_type) (nyio_iterator_t *) |
Get the type of the current element
| nyio_iterator_t*(* nyio_adapter_t::folder_next) (nyio_iterator_t *) |
Go to the next element
| uint64_t(* nyio_adapter_t::folder_size) (nyio_adapter_t *, const char *path, uint32_t len) |
Get the folder size (in bytes)
| void* nyio_adapter_t::internal |
Internal opaque pointer
| void* nyio_adapter_t::invalid_fd |
Value considered as invalid file descriptor
| void(* nyio_adapter_t::release) (nyio_adapter_t *) |
Release the adapter
| nyio_type_t(* nyio_adapter_t::stat) (nyio_adapter_t *, const char *path, uint32_t len) |
Stat a node
| nyio_type_t(* nyio_adapter_t::statex) (nyio_adapter_t *, const char *path, uint32_t len, uint64_t *size, int64_t *modified) |
Stat a node
1.8.12