|
Webserv
|
Classes | |
| struct | FileEntry |
| struct | IpInfo |
| class | Logger |
| class | TempFile |
Enumerations | |
| enum | LogLevel { TRACE , DEBUG , INFO , WARNING , ERROR , FATAL } |
| Defines the severity levels for log messages. More... | |
Functions | |
| bool | writeFile (const std::string &content, const char *path) |
| bool | isDir (const std::string &p) |
| const char * | validateDirectoryPath (const char *path) |
| std::string | getFileExtension (const std::string &fpath) |
| http::HttpStatus | checkFileAccess (const std::string &path, int modeMask, bool allowDirectory=false) |
| std::string | joinPaths (const std::string &p1, const std::string &p2) |
| bool | getDirectoryEntries (std::string const &path, std::vector< FileEntry > &entries) |
| Reads a directory, stats all files, and returns them sorted by name. Uses only opendir/readdir/closedir/stat. | |
| bool | getFileStatus (std::string const &path, struct stat &buf) |
| Simple wrapper for stat to check existence and get details. | |
| template<typename T> | |
| std::string | toString (T const &v) |
| template<typename T> | |
| T | fromString (std::string const &str) |
| std::string | trim (const std::string &s) |
| bool | isAllDigit (std::string const &s) |
| void | toLower (std::string &s) |
| bool | isValidPort (int port) |
| bool | isValidPort (std::string const &) |
| bool | isValidIPv4 (char const *) |
| bool | isValidIPv4 (std::string const &) |
| bool | extractIpInfo (std::string const &, IpInfo &) |
| bool | writeFile (const std::string &content, const char *path, size_t start, size_t end) |
| enum utils::LogLevel |
Defines the severity levels for log messages.
| http::HttpStatus utils::checkFileAccess | ( | const std::string & | path, |
| int | modeMask, | ||
| bool | allowDirectory = false ) |
| bool utils::extractIpInfo | ( | std::string const & | s, |
| IpInfo & | info ) |
| T utils::fromString | ( | std::string const & | str | ) |
| bool utils::getDirectoryEntries | ( | std::string const & | path, |
| std::vector< FileEntry > & | entries ) |
Reads a directory, stats all files, and returns them sorted by name. Uses only opendir/readdir/closedir/stat.
| std::string utils::getFileExtension | ( | const std::string & | fpath | ) |
| bool utils::getFileStatus | ( | std::string const & | path, |
| struct stat & | buf ) |
Simple wrapper for stat to check existence and get details.
| bool utils::isAllDigit | ( | std::string const & | s | ) |
| bool utils::isDir | ( | const std::string & | p | ) |
| bool utils::isValidIPv4 | ( | char const * | ) |
| bool utils::isValidIPv4 | ( | std::string const & | s | ) |
| bool utils::isValidPort | ( | int | port | ) |
| bool utils::isValidPort | ( | std::string const & | v | ) |
| std::string utils::joinPaths | ( | const std::string & | p1, |
| const std::string & | p2 ) |
| void utils::toLower | ( | std::string & | s | ) |
| std::string utils::toString | ( | T const & | v | ) |
| std::string utils::trim | ( | const std::string & | s | ) |
| const char * utils::validateDirectoryPath | ( | const char * | path | ) |
| bool utils::writeFile | ( | const std::string & | content, |
| const char * | path ) |
| bool utils::writeFile | ( | const std::string & | content, |
| const char * | path, | ||
| size_t | start, | ||
| size_t | end ) |