8 #ifndef COMPONENTS_CPP_UTILS_FILE_H_
9 #define COMPONENTS_CPP_UTILS_FILE_H_
18 File(std::string name, uint8_t type = DT_UNKNOWN);
20 std::string
getContent(
bool base64Encode =
false);
21 std::string
getContent(uint32_t offset, uint32_t size);
23 std::string getPath();
uint8_t getType()
Get the type of the file. The type of a file can be DT_REGULAR, DT_DIRECTORY or DT_UNKNOWN.
Definition: File.cpp:101
uint32_t length()
Get the length of the file in bytes.
Definition: File.cpp:110
File(std::string name, uint8_t type=DT_UNKNOWN)
Construct a file.
Definition: File.cpp:22
std::string getContent(bool base64Encode=false)
Retrieve the content of the file.
Definition: File.cpp:33
std::string getName()
Get the name of the file.
Definition: File.cpp:89
bool isDirectory()
Determine if the type of the file is a directory.
Definition: File.cpp:122
A logical representation of a file.
Definition: File.h:16