OpenCV  3.4.20-dev
Open Source Computer Vision
Functions
cv::utils::fs Namespace Reference

Functions

cv::String canonical (const cv::String &path)
 Converts path p to a canonical absolute path Symlinks are processed if there is support for them on running platform. More...
 
bool createDirectories (const cv::String &path)
 
bool createDirectory (const cv::String &path)
 
bool exists (const cv::String &path)
 
cv::String getcwd ()
 
void glob (const cv::String &directory, const cv::String &pattern, std::vector< cv::String > &result, bool recursive=false, bool includeDirectories=false)
 
void glob_relative (const cv::String &directory, const cv::String &pattern, std::vector< cv::String > &result, bool recursive=false, bool includeDirectories=false)
 
bool isDirectory (const cv::String &path)
 
cv::String join (const cv::String &base, const cv::String &path)
 
void remove_all (const cv::String &path)
 

Function Documentation

◆ canonical()

cv::String cv::utils::fs::canonical ( const cv::String path)

Converts path p to a canonical absolute path Symlinks are processed if there is support for them on running platform.

Parameters
pathinput path. Target file/directory should exist.

◆ createDirectories()

bool cv::utils::fs::createDirectories ( const cv::String path)

◆ createDirectory()

bool cv::utils::fs::createDirectory ( const cv::String path)

◆ exists()

bool cv::utils::fs::exists ( const cv::String path)

◆ getcwd()

cv::String cv::utils::fs::getcwd ( )

◆ glob()

void cv::utils::fs::glob ( const cv::String directory,
const cv::String pattern,
std::vector< cv::String > &  result,
bool  recursive = false,
bool  includeDirectories = false 
)

Generate a list of all files that match the globbing pattern.

Result entries are prefixed by base directory path.

Parameters
directorybase directory
patternfilter pattern (based on '*'/'?' symbols). Use empty string to disable filtering and return all results
[out]resultresult of globing.
recursivescan nested directories too
includeDirectoriesinclude directories into results list

◆ glob_relative()

void cv::utils::fs::glob_relative ( const cv::String directory,
const cv::String pattern,
std::vector< cv::String > &  result,
bool  recursive = false,
bool  includeDirectories = false 
)

Generate a list of all files that match the globbing pattern.

Parameters
directorybase directory
patternfilter pattern (based on '*'/'?' symbols). Use empty string to disable filtering and return all results
[out]resultglobbing result with relative paths from base directory
recursivescan nested directories too
includeDirectoriesinclude directories into results list

◆ isDirectory()

bool cv::utils::fs::isDirectory ( const cv::String path)

◆ join()

cv::String cv::utils::fs::join ( const cv::String base,
const cv::String path 
)

Join path components

◆ remove_all()

void cv::utils::fs::remove_all ( const cv::String path)