Class with util functions to work with files.
More...
#include <FileUtils.h>
|
static std::vector< std::string > | handleFilePath (std::map< std::string, ObjectT > ¶ms) |
| Handle a the filepath or efilepath argument from a map of parameters in the context of geometry loading. More...
|
|
static std::vector< std::string > | getFilesByExpression (std::string const pathExpression) |
| Obtain the files which are referenced by the path expression. More...
|
|
static void | unzipFile (std::string const inputPath, std::string const outputPath) |
| Decompress a file generated through ZipSyncFileWriter. More...
|
|
Class with util functions to work with files.
- Author
- Alberto M. Esmoris Pena
- Version
- 1.0
◆ getFilesByExpression()
std::vector< std::string > FileUtils::getFilesByExpression |
( |
std::string const |
pathExpression | ) |
|
|
static |
Obtain the files which are referenced by the path expression.
For instance, the expression "/tmp/heat.*data.csv" would obtain all files in /tmp/ directory which start by "heat" and end by "data.csv"
Another example, using expression "/home/helios/sceneparts/.*\.obj" would obtain all files in "/home/helios/sceneparts/" which end by ".obj"
- Parameters
-
pathExpression | The path expression itself. For instance "/tmp/.*\.csv" |
◆ handleFilePath()
std::vector< std::string > FileUtils::handleFilePath |
( |
std::map< std::string, ObjectT > & |
params | ) |
|
|
static |
Handle a the filepath or efilepath argument from a map of parameters in the context of geometry loading.
- Parameters
-
params | Map of parameters defining the geometry loading process |
- Returns
- Vector of parsed file paths (1 for filepath, n for efilepath)
◆ unzipFile()
void FileUtils::unzipFile |
( |
std::string const |
inputPath, |
|
|
std::string const |
outputPath |
|
) |
| |
|
static |
Decompress a file generated through ZipSyncFileWriter.
- Parameters
-
inputPath | Path to the compressed file to be decompressed |
outputPath | Path where the decompressed file will be written |
- See also
- ZipSyncFileWriter
◆ pathSeparator
char const FileUtils::pathSeparator |
|
static |
Initial value:
Path separator constant.
The documentation for this class was generated from the following files: