Go to the documentation of this file.
28 printf(
"Exploring path: %s\n", path.c_str());
33 printf(
"Found %i files:\n", (
unsigned int)lst.size());
35 for (CDirectoryExplorer::TFileInfoList::iterator it = lst.begin();
36 it != lst.end(); ++it)
38 printf(
"name: %s\n", it->name.c_str());
39 printf(
"wholePath: %s\n", it->wholePath.c_str());
40 printf(
"isDir: %c\n", it->isDir ?
'Y' :
'N');
41 printf(
"size: %lu bytes\n", (
unsigned long)it->fileSize);
42 printf(
"-----------------------\n");
64 S =
"foo.bardotbar.too";
92 catch (
const std::exception& e)
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
#define FILE_ATTRIB_ARCHIVE
#define FILE_ATTRIB_DIRECTORY
std::deque< TFileInfo > TFileInfoList
The list type used in "explore".
std::string getcwd()
Returns the current working directory
std::string extractFileName(const std::string &filePath)
Extract just the name (without extension) of a filename from a complete path plus name plus extension...
std::string exception_to_str(const std::exception &e)
Builds a nice textual representation of a nested exception, which if generated using MRPT macros (THR...
static void explore(const std::string &path, const unsigned long mask, TFileInfoList &outList)
The path of the directory to examine must be passed to this constructor, among the According to the f...
Page generated by Doxygen 1.8.17 for MRPT 2.0.4 at Sun Jul 19 15:15:43 UTC 2020 | |