Typedefs | Functions
swri_system_util Namespace Reference

Typedefs

typedef boost::filesystem::filesystem_error PathException
 

Functions

std::vector< std::string > Find (const std::string &path, const std::string &expression, int max_depth=-1)
 
std::vector< std::string > load_all_files (const std::string &path, std::string &directory)
 
boost::filesystem::path NaiveUncomplete (boost::filesystem::path const path, boost::filesystem::path const base)
 

Typedef Documentation

◆ PathException

typedef boost::filesystem::filesystem_error swri_system_util::PathException

Definition at line 45 of file file_util.h.

Function Documentation

◆ Find()

std::vector< std::string > swri_system_util::Find ( const std::string &  path,
const std::string &  expression,
int  max_depth = -1 
)

Return the list of files within a directory that match a regular expression.

Parameters
[in]pathPath to search from
[in]expressionRegular expression for the filename.
[in]max_depthMax depth to search for files. Use -1 for unlimited depth.
Returns
The list of files.

Definition at line 162 of file file_util.cpp.

◆ load_all_files()

std::vector< std::string > swri_system_util::load_all_files ( const std::string &  path,
std::string &  directory 
)

Return a list of all file names within a directory (handles wildcard character "*").

Parameters
[in]pathThe absolute path containing the files (Add wildcard to filename).
Returns
The list of filenames of all found files

Definition at line 114 of file file_util.cpp.

◆ NaiveUncomplete()

boost::filesystem::path swri_system_util::NaiveUncomplete ( boost::filesystem::path const  path,
boost::filesystem::path const  base 
)

Generate a relative file path between two absolute paths.

Parameters
[in]pathThe absolute path to convert to relative.
[in]baseThe base path.
Returns
The relative path if valid and an empty path otherwise.

Definition at line 38 of file file_util.cpp.



swri_system_util
Author(s): Marc Alban
autogenerated on Thu Oct 21 2021 02:13:17