37 #define FF_MAX_LFN 255
39 #define FTP_TIME_OUT 5 * 60 // Disconnect client after 5 minutes of inactivity
40 #define FTP_AUTH_TIME_OUT 10 // Wait for authentication for 10 seconds
41 #define FTP_CMD_SIZE FF_MAX_LFN+8 // max size of a command
42 #define FTP_CWD_SIZE FF_MAX_LFN+8 // max size of a directory name
43 #define FTP_FIL_SIZE FF_MAX_LFN // max size of a file name
44 #define FTP_BUF_SIZE 1024 // 512 // size of file buffer for read/write
46 #define FTP_SERVER WiFiServer
47 #define FTP_CLIENT WiFiClient
48 #define CommandIs( a ) (command != NULL && ! strcmp_P( command, PSTR( a )))
49 #define ParameterIs( a ) ( parameter != NULL && ! strcmp_P( parameter, PSTR( a )))
97 bool isUser(
const char * user);
101 void clientConnected();
102 void disconnectClient();
103 bool processCommand();
104 bool haveParameter();
105 int dataConnect(
bool out150 =
true );
106 bool dataConnected();
111 void closeTransfer();
112 void abortTransfer();
113 bool makePath(
char * fullName,
char * param = NULL );
114 bool makeExistsPath(
char * path,
char * param = NULL );
115 char * makeDateTimeStr(
char * tstr, time_t timefile );
116 char * makeDateTimeString(
char * tstr, time_t timefile );
117 uint8_t getDateTime(
char * dt, uint16_t * pyear, uint8_t * pmonth, uint8_t * pday,
118 uint8_t * phour, uint8_t * pminute, uint8_t * second );
120 bool getFileModTime(
const char * path,time_t & time);
121 bool timeStamp(
const char * path, uint16_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second );
128 uint16_t passivePort;
151 uint32_t millisDelay,
160 #endif // FTP_SERVER_H