Arduino TinyFTP
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ftp_client::FTPClient Class Reference

FTPClient Basic FTP access class which supports directory operatations and the opening of a files. More...

#include <ArduinoFTPClient.h>

Public Member Functions

 FTPClient (Client &command, Client &data, int port=COMMAND_PORT, int data_port=DATA_PORT)
 default construcotr More...
 
virtual bool begin (IPAddress remote_addr, const char *user="anonymous", const char *password=nullptr)
 opens the ftp connection
 
virtual bool end ()
 
virtual FTPFileopen (const char *filename, FileMode mode=READ_MODE)
 get the file
 
virtual bool mkdir (const char *filepath)
 
virtual bool remove (const char *filepath)
 Delete the file.
 
virtual bool rmdir (const char *filepath)
 Removes a directory.
 
virtual FTPFileIterator ls (const char *path, FileMode mode=WRITE_MODE)
 lists all file names in the specified directory
 
virtual bool binary ()
 Switch to binary mode.
 
virtual bool ascii ()
 Switch to ascii mode.
 
virtual bool type (const char *str)
 Binary or ascii with type command.
 

Protected Member Functions

void init (Client *command, Client *data, int port=COMMAND_PORT, int data_port=DATA_PORT)
 

Protected Attributes

FTPBasicAPI api
 
Client * command_ptr = nullptr
 
Client * data_ptr = nullptr
 
IPAddress remote_addr
 
const char * userid = nullptr
 
const char * password = nullptr
 
int port
 
int data_port
 
bool cleanup_clients
 

Detailed Description

FTPClient Basic FTP access class which supports directory operatations and the opening of a files.

Constructor & Destructor Documentation

◆ FTPClient()

ftp_client::FTPClient::FTPClient ( Client &  command,
Client &  data,
int  port = COMMAND_PORT,
int  data_port = DATA_PORT 
)

default construcotr

FTPClient Basic FTP access class which supports directory operatations and the opening of a files.

Member Function Documentation

◆ end()

bool ftp_client::FTPClient::end ( )
virtual

call this when a card is removed. It will allow you to inster and initialise a new card.

◆ mkdir()

bool ftp_client::FTPClient::mkdir ( const char *  filepath)
virtual

Create the requested directory heirarchy–if intermediate directories do not exist they will be created.


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