|
Arduino TinyFTP
|
CallbackFile The file which is returned by CallbackFSClass::open(): a directory (with the entries provided by the list callback), a directory entry, a file which is read with the read callback, a file which is written with the write callback or an invalid file. More...
#include <CallbackFS.h>
Public Member Functions | |
| CallbackFile (const CallbackFileInfo &info) | |
| Directory entry. | |
| CallbackFile (const char *path, std::vector< CallbackFileInfo > entries) | |
| Directory with its entries. | |
| CallbackFile (CallbackFSClass *fs, const char *path, const char *mode, size_t size) | |
| File which is read or written via the callbacks of fs. | |
| operator bool () | |
| bool | isDirectory () |
| CallbackFile | openNextFile () |
| Provides the next entry of a directory (or an invalid file at the end) | |
| size_t | size () |
| const char * | name () |
| int | available () |
| Returns 1 while the end of the file has not been reached. | |
| int | read (uint8_t *data, size_t len) |
| Reads the next data via the read callback. | |
| size_t | write (const uint8_t *data, size_t len) |
| Provides the data to the write callback. | |
| void | close () |
| Closes the file: reported as Close operation for read and written files. | |
Protected Types | |
| enum | Kind { Invalid , Directory , Entry , Reader , Writer } |
Protected Attributes | |
| Kind | kind = Invalid |
| CallbackFileInfo | info |
| std::shared_ptr< std::vector< CallbackFileInfo > > | entries |
| size_t | pos = 0 |
| CallbackFSClass * | fs = nullptr |
| const char * | mode = "r" |
| bool | eof = false |
CallbackFile The file which is returned by CallbackFSClass::open(): a directory (with the entries provided by the list callback), a directory entry, a file which is read with the read callback, a file which is written with the write callback or an invalid file.