Add Firmware Directory

This commit is contained in:
Xphalnos 2025-06-20 20:40:27 +02:00
parent 4d4f0c8490
commit b552608b83
2 changed files with 8 additions and 3 deletions

View file

@ -63,10 +63,12 @@ static auto UserPaths = [] {
if (nixos) { if (nixos) {
currentDir /= "files"; currentDir /= "files";
insert_path(PathType::RootDir, currentDir); insert_path(PathType::RootDir, currentDir);
insert_path(PathType::FirmwareDir, currentDir / FW_DIR);
insert_path(PathType::LogDir, currentDir / LOG_DIR); insert_path(PathType::LogDir, currentDir / LOG_DIR);
} }
else { else {
insert_path(PathType::RootDir, currentDir, false); insert_path(PathType::RootDir, currentDir, false);
insert_path(PathType::FirmwareDir, binaryDir / FW_DIR);
insert_path(PathType::LogDir, binaryDir / LOG_DIR); insert_path(PathType::LogDir, binaryDir / LOG_DIR);
} }
return paths; return paths;

View file

@ -12,6 +12,7 @@ namespace FS {
enum class PathType { enum class PathType {
BinaryDir, // Binary Path BinaryDir, // Binary Path
FirmwareDir, // Where log files are stored
RootDir, // Execution Path RootDir, // Execution Path
LogDir, // Where log files are stored LogDir, // Where log files are stored
}; };
@ -29,6 +30,8 @@ typedef struct _FileInfo {
FileType fileType; // File Type (directory/file) FileType fileType; // File Type (directory/file)
} FileInfo; } FileInfo;
constexpr auto FW_DIR = "firmware";
constexpr auto LOG_DIR = "log"; constexpr auto LOG_DIR = "log";
constexpr auto LOG_FILE = "pound_log.txt"; constexpr auto LOG_FILE = "pound_log.txt";