Implemented directory listing

This commit is contained in:
Daniel Brunner
2018-10-04 23:32:24 +02:00
parent 2d33897c2a
commit 7f5df336e0
7 changed files with 131 additions and 6 deletions
+7
View File
@@ -2,6 +2,8 @@
#include "webapplication.h"
#include <QDir>
class QJsonObject;
class WebServer;
@@ -9,6 +11,8 @@ class WebServer;
class FileserverApplication : public WebApplication
{
Q_OBJECT
static const QString SERVER_NAME;
static const QDir PLUGIN_RESOURCES_DIR;
public:
FileserverApplication(const QJsonObject &config, WebServer &webServer);
@@ -18,5 +22,8 @@ public:
void handleRequest(HttpClientConnection *connection, const HttpRequest &request) Q_DECL_OVERRIDE;
private:
static QString formatSize(qint64 size);
WebServer &m_webServer;
QDir m_rootPath;
};