|
Arduino TinyFTP
|
FTPFileIterator The file name iterator can be used to list all available files and directories. We open a separate session for the ls operation so that we do not need to keep the result in memory and we don't lose the data when we mix it with read and write operations. The listed files use their own sessions. More...
#include <FTPFileIterator.h>
Public Member Functions | |
| FTPFileIterator (FTPSessionProvider *provider, FTPBasicAPI *api, const char *dir, FileMode mode) | |
| FTPFileIterator & | begin () |
| FTPFileIterator & | end () |
| FTPFileIterator & | operator++ () |
| FTPFileIterator | operator++ (int) |
| FTPFile | operator* () |
| Provides the listed file: it uses its own session when it is accessed. | |
| bool | operator!= (const FTPFileIterator &comp) |
| bool | operator== (const FTPFileIterator &comp) |
| bool | operator> (const FTPFileIterator &comp) |
| bool | operator< (const FTPFileIterator &comp) |
| bool | operator>= (const FTPFileIterator &comp) |
| bool | operator<= (const FTPFileIterator &comp) |
| const char * | fileName () |
Protected Member Functions | |
| void | readLine () |
| Reads the next (non empty) entry: buffer is empty at the end of the list. | |
| bool | readDataLine (FTPBasicAPI *api) |
Protected Attributes | |
| FTPSessionProvider * | provider = nullptr |
| FTPTransferHandle | transfer |
| Stream * | stream_ptr = nullptr |
| FileMode | file_mode = READ_MODE |
| String | directory_name |
| String | buffer = "" |
FTPFileIterator The file name iterator can be used to list all available files and directories. We open a separate session for the ls operation so that we do not need to keep the result in memory and we don't lose the data when we mix it with read and write operations. The listed files use their own sessions.
Copies of an iterator share the same listing: it is ended when all entries have been read or when the last copy is destroyed.
|
inlineprotected |
Reads a line from the data connection into buffer: returns false at the end of the data