Filesystem file example
#include <iostream>
int main(int argc, char** argv)
{
char buffer[] = "The quick brown fox jumps over the lazy dog";
std::cout <<
"File size: " << file.
size() << std::endl;
std::cout << "File content: " << text << std::endl;
return 0;
}
void Close()
Close the file.
uint64_t size() const
Get the current file size.
void Flush() override
Flush the file.
void Create(bool read, bool write, const Flags< FileAttributes > &attributes=File::DEFAULT_ATTRIBUTES, const Flags< FilePermissions > &permissions=File::DEFAULT_PERMISSIONS, size_t buffer=File::DEFAULT_BUFFER)
Create a new file.
size_t Write(const void *buffer, size_t size) override
Write a byte buffer into the opened file.
std::string ReadAllText()
Read all text.
static Path Remove(const Path &path)
Remove the given path (file, empty directory, symlink, etc) from the filesystem.
Static array countof definition.
Filesystem file definition.
constexpr size_t countof(const T(&)[N]) noexcept
Count of elements in static array.