16
16
#include " Commands/RNFR_RNTO.h"
17
17
#include " Commands/STOR.h"
18
18
#include " Commands/TYPE.h"
19
+ #include " Commands/MLSD.h"
19
20
20
21
FTPConnection::FTPConnection (const WiFiClient & Client, std::list<FTPUser> & UserList, FTPFilesystem & Filesystem)
21
22
: _ClientState(Idle), _Client(Client), _Filesystem(Filesystem), _UserList(UserList), _AuthUsername(" " )
@@ -27,6 +28,7 @@ FTPConnection::FTPConnection(const WiFiClient & Client, std::list<FTPUser> & Use
27
28
_FTPCommands.push_back (std::shared_ptr<FTPCommand>(new CWD (&_Client, &_Filesystem)));
28
29
_FTPCommands.push_back (std::shared_ptr<FTPCommand>(new DELE (&_Client, &_Filesystem)));
29
30
_FTPCommands.push_back (std::shared_ptr<FTPCommand>(new LIST (&_Client, &_Filesystem, &_DataAddress, &_DataPort)));
31
+ _FTPCommands.push_back (std::shared_ptr<FTPCommand>(new MLSD (&_Client, &_Filesystem, &_DataAddress, &_DataPort)));
30
32
_FTPCommands.push_back (std::shared_ptr<FTPCommand>(new MKD (&_Client, &_Filesystem)));
31
33
_FTPCommands.push_back (std::shared_ptr<FTPCommand>(new PORT (&_Client, &_DataAddress, &_DataPort)));
32
34
_FTPCommands.push_back (std::shared_ptr<FTPCommand>(new PWD (&_Client)));
@@ -114,6 +116,28 @@ bool FTPConnection::handle()
114
116
_Line = " " ;
115
117
return true ;
116
118
}
119
+ /* * Additional commads begin ************************************* by Akoro */
120
+ else if (command == " OPTS" ) // need for Win10 ftp
121
+ {
122
+ _Client.println (" 500 not implemented" );
123
+ _Line = " " ;
124
+ return true ;
125
+ }
126
+ else if (command == " NOOP" )
127
+ {
128
+ _Client.println (" 200 Ok" );
129
+ _Line = " " ;
130
+ return true ;
131
+ }
132
+ else if (command == " FEAT" )
133
+ {
134
+ _Client.println (" 211- Extensions suported:" );
135
+ _Client.println (" MLSD" );
136
+ _Client.println (" 211 End." );
137
+ _Line = " " ;
138
+ return true ;
139
+ }
140
+ /* * Additional commads end ************************************* by Akoro */
117
141
else if (command == " QUIT" )
118
142
{
119
143
_Client.println (" 221 Goodbye" );
@@ -246,5 +270,5 @@ void FTPConnection::c_PASS()
246
270
_ClientState = AuthPass;
247
271
return ;
248
272
}
249
- _Client.println (" 530 passwort not correct" );
273
+ _Client.println (" 530 password not correct" );
250
274
}
0 commit comments