#include <FileUtil.h>
|
| static std::string | createTempFilename (const std::string &prefix, const std::string &suffix="") |
| | Creates a temporary file name with the format "prefix".XXXXXXsuffix. This format is used with mkstemp to create a temporary file. More...
|
| |
| static void | deleteTempFilename (const std::string &filename) |
| | Deletes a temporary file name. More...
|
| |
| static bool | write (const std::string &s, const std::string &filename, std::string &error) |
| | Writes a string into a file. More...
|
| |
- Author
- Jordi Cortadella
- Date
- 05/01/19
◆ createTempFilename()
| static std::string FileUtil::createTempFilename |
( |
const std::string & |
prefix, |
|
|
const std::string & |
suffix = "" |
|
) |
| |
|
inlinestatic |
Creates a temporary file name with the format "prefix".XXXXXXsuffix. This format is used with mkstemp to create a temporary file.
- Parameters
-
| prefix | Prefix of the file. |
| suffix | Suffix of the file. |
- Returns
- The file name.
◆ deleteTempFilename()
| static void FileUtil::deleteTempFilename |
( |
const std::string & |
filename | ) |
|
|
inlinestatic |
Deletes a temporary file name.
- Parameters
-
| filename | The name of the file. |
◆ write()
| static bool FileUtil::write |
( |
const std::string & |
s, |
|
|
const std::string & |
filename, |
|
|
std::string & |
error |
|
) |
| |
|
inlinestatic |
Writes a string into a file.
- Parameters
-
| s | The string to be written. |
| filename | The name of the file (if empty, the string is written into cout). |
| error | In case of error, the message is stored in this parameter. |
- Returns
- True if successful, and false otherwise.
- Note
- error is only modified in case an error is produced.
The documentation for this class was generated from the following file:
- /home/dynamatic/Dynamatic/etc/dhls/Buffers/inc/FileUtil.h