Arduino TinyFTP
All Classes Functions Pages
Public Member Functions | Protected Attributes | List of all members
ftp_client::FTPFile Class Reference

FTPFile A single file which supports read and write operations. This class is implemented as an Arduino Stream and therefore provides all corresponding functionality. More...

#include <FTPFile.h>

Inheritance diagram for ftp_client::FTPFile:

Public Member Functions

 FTPFile (FTPBasicAPI *api_ptr, const char *name, FileMode mode, bool autoClose=true)
 
size_t write (uint8_t data)
 
size_t write (const uint8_t *data, size_t len) override
 
size_t write (const char *data, int len)
 
int read ()
 
size_t readBytes (char *buf, size_t nbyte)
 
size_t readBytes (uint8_t *buf, size_t nbyte)
 
size_t readln (char *buf, size_t nbyte)
 
int peek ()
 
int available ()
 
void flush ()
 
void reopen ()
 
void close ()
 
bool cancel ()
 
const char * name () const
 
size_t size () const
 
void setEOL (char *eol)
 
bool isDirectory () const
 
 operator bool ()
 

Protected Attributes

String file_name
 
const char * eol = "\n"
 
FileMode mode
 
FTPBasicAPIapi_ptr
 
ObjectType object_type = TypeUndefined
 
bool is_open = true
 
bool auto_close = false
 

Detailed Description

FTPFile A single file which supports read and write operations. This class is implemented as an Arduino Stream and therefore provides all corresponding functionality.

Author
Phil Schatzmann

The documentation for this class was generated from the following file: