![]() |
OpenCV 4.12.0
开源计算机视觉
|
函数 | |
| cv::String | canonical (const cv::String &path) |
| 将路径 p 转换为规范的绝对路径。如果运行平台支持符号链接,则会处理它们。 | |
| bool | createDirectories (const cv::String &path) |
| bool | createDirectory (const cv::String &path) |
| bool | exists (const cv::String &path) |
| cv::String | getCacheDirectoryForDownloads () |
| cv::String | getcwd () |
| cv::String | getParent (const cv::String &path) |
| std::wstring | getParent (const std::wstring &path) |
| 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) |
| cv::String cv::utils::fs::canonical | ( | const cv::String & | 路径 | ) |
将路径 p 转换为规范的绝对路径。如果运行平台支持符号链接,则会处理它们。
| 路径 | 输入路径。目标文件/目录应该存在。 |
| bool cv::utils::fs::createDirectories | ( | const cv::String & | 路径 | ) |
| bool cv::utils::fs::createDirectory | ( | const cv::String & | 路径 | ) |
| bool cv::utils::fs::exists | ( | const cv::String & | 路径 | ) |
| cv::String cv::utils::fs::getCacheDirectoryForDownloads | ( | ) |
| Python | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| cv.utils.fs.getCacheDirectoryForDownloads( | ) -> | retval | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| cv::String cv::utils::fs::getcwd | ( | ) |
| cv::String cv::utils::fs::getParent | ( | const cv::String & | 路径 | ) |
获取父目录
| std::wstring cv::utils::fs::getParent | ( | const std::wstring & | 路径 | ) |
| void cv::utils::fs::glob | ( | const cv::String & | directory, |
| const cv::String & | pattern, | ||
| std::vector< cv::String > & | result, | ||
| bool | recursive = false, | ||
| bool | includeDirectories = false ) |
生成与 globbing 模式匹配的所有文件的列表。
结果条目以基本目录路径为前缀。
| directory | 基本目录 | |
| pattern | 过滤器模式(基于 '*'/'?' 符号)。 使用空字符串禁用过滤并返回所有结果 | |
| [输出] | result | globbing 的结果。 |
| recursive | 也扫描嵌套目录 | |
| includeDirectories | 将目录包含到结果列表中 |
| 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 ) |
生成与 globbing 模式匹配的所有文件的列表。
| directory | 基本目录 | |
| pattern | 过滤器模式(基于 '*'/'?' 符号)。 使用空字符串禁用过滤并返回所有结果 | |
| [输出] | result | globbing 结果,带有来自基本目录的相对路径 |
| recursive | 也扫描嵌套目录 | |
| includeDirectories | 将目录包含到结果列表中 |
| bool cv::utils::fs::isDirectory | ( | const cv::String & | 路径 | ) |
| cv::String cv::utils::fs::join | ( | const cv::String & | base, |
| const cv::String & | path ) |
连接路径组件
| void cv::utils::fs::remove_all | ( | const cv::String & | 路径 | ) |