24.02
|
Typedefs | |
using | FileContents = std::string |
Functions | |
fs::path | NamedTempFile (const char *fileName) |
Returns a path to a file in the system temporary folder. If the file existed it will be deleted. More... | |
std::string | CreateDirectory (std::string sPath) |
Returns full path to temporary folder. More... | |
FileContents | ReadFileContentsIntoString (const std::string &path) |
void | RemoveDirectoryAndContents (const std::string &path) |
Remove a directory and its contents. More... | |
using FileContents = std::string |
Definition at line 24 of file Filesystem.hpp.
std::string CreateDirectory | ( | std::string | path | ) |
Returns full path to temporary folder.
Construct a temporary directory.
Given a specified directory name construct a path in the system temporary directory. If the directory already exists, it is deleted, otherwise create it. This could throw filesystem_error exceptions.
path | is the path required in the temporary directory. |
RuntimeException | if the directory cannot be created or exists but cannot be removed. |
Definition at line 47 of file Filesystem.cpp.
References armnn::error, and RemoveDirectoryAndContents().
Referenced by armnn::Optimize().
fs::path NamedTempFile | ( | const char * | fileName | ) |
Returns a path to a file in the system temporary folder. If the file existed it will be deleted.
Construct a temporary file name.
Given a specified file name construct a path to that file in the system temporary directory. If the file already exists it is deleted. This could throw filesystem_error exceptions.
fileName | the file name required in the temporary directory. |
Definition at line 25 of file Filesystem.cpp.
Referenced by TEST_SUITE().
FileContents ReadFileContentsIntoString | ( | const std::string & | path | ) |
Definition at line 102 of file Filesystem.cpp.
void RemoveDirectoryAndContents | ( | const std::string & | path | ) |
Remove a directory and its contents.
Given a directory path delete it's contents and the directory. If the specified directory doesn't exist this does nothing. If any item cannot be removed this will throw a RuntimeException.
full_path |
Definition at line 84 of file Filesystem.cpp.
References armnn::error.
Referenced by CreateDirectory().