MCPcopy Create free account
hub / github.com/SmingHub/Sming / onCommand

Method onCommand

Sming/Components/Network/src/Network/Ftp/FtpServer.cpp:32–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30}
31
32bool FtpServer::onCommand(String cmd, [[maybe_unused]] String data, FtpServerConnection& connection)
33{
34 if(cmd == _F("FSFORMAT")) {
35 auto fs = connection.getFileSystem();
36 if(fs != nullptr) {
37 int err = fs->format();
38 connection.response(200, F("File system format: ") + fileGetErrorString(err));
39 }
40 return true;
41 }
42 return false;
43}

Callers

nothing calls this directly

Calls 5

fileGetErrorStringFunction · 0.85
FFunction · 0.50
getFileSystemMethod · 0.45
formatMethod · 0.45
responseMethod · 0.45

Tested by

no test coverage detected