Logo Pico-Framework A web-first embedded framework for C++
Loading...
Searching...
No Matches
HttpFileserver.cpp File Reference

Implementation of file serving and directory listing over HTTP. More...

#include "http/HttpFileserver.h"
#include "framework_config.h"
#include "DebugTrace.h"
#include <string>
#include <vector>
#include <cstdio>
#include <cstring>
#include <lwip/sockets.h>
#include <unordered_map>
#include <FreeRTOS.h>
#include <task.h>
#include "framework/AppContext.h"
#include "utility/utility.h"
#include "http/url_utils.h"
#include "storage/StorageManager.h"
#include "http/JsonResponse.h"
+ Include dependency graph for HttpFileserver.cpp:

Go to the source code of this file.

Macros

#define TRACE_ON
 

Functions

bool ends_with (const std::string &str, const std::string &suffix)
 

Detailed Description

Author
Ian Archbell

Part of the PicoFramework HTTP server. This module handles serving files from the SD card and listing directory contents. It uses the FatFsStorageManager to interact with the filesystem.

Version
0.1
Date
2025-03-26
License:\n MIT License

Definition in file HttpFileserver.cpp.

Macro Definition Documentation

◆ TRACE_ON

#define TRACE_ON

Definition at line 41 of file HttpFileserver.cpp.

Function Documentation

◆ ends_with()

bool ends_with ( const std::string &  str,
const std::string &  suffix 
)

Definition at line 195 of file HttpFileserver.cpp.

196{
197 if (str.length() < suffix.length())
198 return false;
199 return std::equal(suffix.rbegin(), suffix.rend(), str.rbegin());
200}