Treelite
|
Cross-platform wrapper for common filesystem functions. More...
#include <string>
#include <vector>
Go to the source code of this file.
Functions | |
void | CreateDirectoryIfNotExist (const char *dirpath) |
Create a directory with a given name if one doesn't exist already. More... | |
void | WriteToFile (const std::string &filename, const std::string &content) |
Write a sequence of strings to a text file, with newline character ( ) inserted between strings. This function is suitable for creating multi-line text files. More... | |
void | WriteToFile (const std::string &filename, const std::vector< char > &content) |
Write a sequence of bytes to a text file. More... | |
Cross-platform wrapper for common filesystem functions.
Copyright (c) 2020 by Contributors
Definition in file filesystem.h.
void CreateDirectoryIfNotExist | ( | const char * | dirpath | ) |
Create a directory with a given name if one doesn't exist already.
dirpath | Path to directory to be created. |
Definition at line 54 of file filesystem.cc.
void WriteToFile | ( | const std::string & | filename, |
const std::string & | content | ||
) |
Write a sequence of strings to a text file, with newline character (
) inserted between strings. This function is suitable for creating multi-line text files.
filename | name of text file |
lines | a sequence of strings to be written. |
Definition at line 88 of file filesystem.cc.
void WriteToFile | ( | const std::string & | filename, |
const std::vector< char > & | content | ||
) |
Write a sequence of bytes to a text file.
filename | name of text file |
lines | a sequence of strings to be written. |
Definition at line 93 of file filesystem.cc.