Helios++
Helios software for LiDAR simulations
FileUtils Class Reference

Class with util functions to work with files. More...

#include <FileUtils.h>

Static Public Member Functions

static std::vector< std::string > handleFilePath (std::map< std::string, ObjectT > &params)
 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...
 

Static Public Attributes

static char const pathSeparator
 Path separator constant. More...
 

Detailed Description

Class with util functions to work with files.

Author
Alberto M. Esmoris Pena
Version
1.0

Member Function Documentation

◆ 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
pathExpressionThe 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
paramsMap 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
inputPathPath to the compressed file to be decompressed
outputPathPath where the decompressed file will be written
See also
ZipSyncFileWriter

Member Data Documentation

◆ pathSeparator

char const FileUtils::pathSeparator
static
Initial value:
=
'/'

Path separator constant.


The documentation for this class was generated from the following files: