My Project
 All Classes Functions Variables Pages
Public Member Functions | List of all members
FTPFileCallbacks Class Reference

#include <FTPServer.h>

Inheritance diagram for FTPFileCallbacks:
FTPCallbacks

Public Member Functions

void onStoreStart (std::string fileName) override
 
size_t onStoreData (uint8_t *data, size_t size) override
 
void onStoreEnd () override
 
void onRetrieveStart (std::string fileName) override
 
size_t onRetrieveData (uint8_t *data, size_t size) override
 
void onRetrieveEnd () override
 
std::string onDir () override
 

Detailed Description

An implementation of FTPCallbacks that uses Posix File I/O to perform file access.

Member Function Documentation

std::string FTPFileCallbacks::onDir ( )
overridevirtual

Return a list of files in the file system.

Returns
a list of files in the file system.

Reimplemented from FTPCallbacks.

size_t FTPFileCallbacks::onRetrieveData ( uint8_t *  data,
size_t  size 
)
overridevirtual

Called when the client is ready to receive the next piece of the file. To indicate that there is no more data to send, return a size of 0.

Parameters
dataThe data buffer that we can fill to return data back to the client.
sizeThe maximum size of the data buffer that we can populate.
Returns
The size of data being returned. Return 0 to indicate that there is no more data to return.

Reimplemented from FTPCallbacks.

void FTPFileCallbacks::onRetrieveEnd ( )
overridevirtual

Called when the retrieval has been completed.

Reimplemented from FTPCallbacks.

void FTPFileCallbacks::onRetrieveStart ( std::string  fileName)
overridevirtual

Called when the client requests retrieval of a file.

Reimplemented from FTPCallbacks.

size_t FTPFileCallbacks::onStoreData ( uint8_t *  data,
size_t  size 
)
overridevirtual

Called when the client presents a new chunk of data to be saved.

Reimplemented from FTPCallbacks.

void FTPFileCallbacks::onStoreEnd ( )
overridevirtual

Called at the end of a STOR request. This indicates that the client has completed its transmission of the file.

Reimplemented from FTPCallbacks.

void FTPFileCallbacks::onStoreStart ( std::string  fileName)
overridevirtual

Called at the start of a STOR request. The file name is the name of the file the client would like to save.

Reimplemented from FTPCallbacks.


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