Filesystem-related utilities.
More...
|
| void | AppendFile (const std::string &path, const std::string &data) |
| | Appends data to a file (creates the file if it doesn't exist).
|
| |
| std::string | ReadFile (const std::string &path) |
| | Reads the entire contents of a file into a string.
|
| |
| void | WriteFile (const std::string &path, const std::string &data) |
| | Writes data to a file, overwriting any existing contents.
|
| |
Filesystem-related utilities.
◆ AppendFile()
| void xs::fs::AppendFile |
( |
const std::string & | path, |
|
|
const std::string & | data ) |
Appends data to a file (creates the file if it doesn't exist).
- Parameters
-
| path | Path |
| data | Data to append to the file. |
◆ ReadFile()
| std::string xs::fs::ReadFile |
( |
const std::string & | path | ) |
|
Reads the entire contents of a file into a string.
- Parameters
-
- Returns
- std::string File contents (empty on error or if file missing).
◆ WriteFile()
| void xs::fs::WriteFile |
( |
const std::string & | path, |
|
|
const std::string & | data ) |
Writes data to a file, overwriting any existing contents.
- Parameters
-
| path | Path |
| data | Data to write to the file. |