Arduino TinyFTP
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
ftp_client::FTPClient< ClientType > Class Template Reference

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

#include <FTPClient.h>

Public Member Functions

 FTPClient (int port=FTP_COMMAND_PORT, bool useType=false)
 Default constructor: Provide the client class as template argument e.g. FTPClient<WiFiClient> client;.
 
void setUseTypeCommand (bool useType)
 if set to true the BIN and ASCII command are executed as type I or A
 
bool begin (IPAddress remote_addr, const char *user="anonymous", const char *password=nullptr)
 Opens the FTP connection.
 
void end ()
 Close the sessions by calling QUIT or BYE.
 
FTPFile open (const char *filename, FileMode mode=READ_MODE, bool autoClose=false)
 Open a file.
 
bool mkdir (const char *filepath)
 
bool remove (const char *filepath)
 Delete the file.
 
bool rmdir (const char *filepath)
 Removes a directory.
 
FTPFileIterator ls (const char *path, FileMode mode=WRITE_MODE)
 Lists all file names in the specified directory.
 
bool binary ()
 Switch to binary mode.
 
bool ascii ()
 Switch to ascii mode.
 
bool type (const char *str)
 Binary or ascii with type command.
 
void setPort (int port)
 
bool abort (CurrentOperation op)
 Abort the indicated operation (e.g., READ_OP, WRITE_OP, LS_OP.)
 
FTPSessionMgr< ClientType > & sessionMgr ()
 Provides access to the session manager.
 

Protected Attributes

FTPSessionMgr< ClientTypemgr
 
IPAddress remote_addr
 
const charuserid = nullptr
 
const charpassword = nullptr
 
int port
 
bool cleanup_clients
 
bool auto_close = true
 
bool use_type_command = false
 

Detailed Description

template<class ClientType>
class ftp_client::FTPClient< ClientType >

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

Author
Phil Schatzmann

Member Function Documentation

◆ mkdir()

template<class ClientType >
bool ftp_client::FTPClient< ClientType >::mkdir ( const char filepath)
inline

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


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