Decentralised Art Server
High-performance C++ backend that exposes HTML interface and a secure REST API for managing Performative Transactions entities
 
Loading...
Searching...
No Matches
file.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <fstream>
4#include <filesystem>
5#include <optional>
6
7#include <spdlog/spdlog.h>
8
9namespace dcn
10{
16 void setBinPath(std::filesystem::path bin_path);
17
18 std::filesystem::path getBinPath();
19
20 std::filesystem::path getStoragePath();
21 std::filesystem::path getResourcesPath();
22 std::filesystem::path getLogsPath();
23 std::filesystem::path getPTPath();
24
25
26 std::optional<std::string> loadTextFile(std::filesystem::path path);
27
28 std::optional<std::vector<std::byte>> loadBinaryFile(std::filesystem::path path);
29}
Definition decentralised_art.hpp:30
std::filesystem::path getStoragePath()
Definition file.cpp:27
std::filesystem::path getLogsPath()
Definition file.cpp:32
std::optional< std::vector< std::byte > > loadBinaryFile(std::filesystem::path path)
Definition file.cpp:66
std::optional< std::string > loadTextFile(std::filesystem::path path)
Definition file.cpp:42
void setBinPath(std::filesystem::path bin_path)
Set the BIN_PATH variable to the path of the binary directory.
Definition file.cpp:12
std::filesystem::path getPTPath()
Definition file.cpp:37
std::filesystem::path getBinPath()
Definition file.cpp:17
std::filesystem::path getResourcesPath()
Definition file.cpp:22