#include <iostream>
#include <string>
#include <vector>
#include <dirent.h>
#include <sys/stat.h>
#include <cstdio>
#include <unistd.h>
Go to the source code of this file.
Functions | |
std::vector< std::string > | listFiles (std::string searchPath, std::string filter) |
return list of files in searchPath that include the string filter. More... | |
bool | fileExists (std::string outputPath) |
return bool does file exist More... | |
int | removeFiles (std::string rmPath, std::string rmfilter) |
return number of files deleted More... | |
bool fileExists | ( | std::string | outputPath | ) |
return bool does file exist
std::vector<std::string> listFiles | ( | std::string | searchPath, |
std::string | filter | ||
) |
return list of files in searchPath that include the string filter.
If a NULL string is passed to filter it will return all files in the search Path. If a NULL string is passed to rmPath, the current working directory will be evaluated.
[in] | searchPath | the path to search for files |
[in] | filter | only files that include the filter will be returned |
int removeFiles | ( | std::string | rmPath, |
std::string | rmfilter | ||
) |
return number of files deleted
set search path with rmPath
set filter within rmPath with rmFilter (for example file base name or ending)
If a NULL string is passed to rmFilter it will remove all files matching rmPath. If a NULL string is passed to rmPath, the current working directory will be evaluated
[in] | rmPath | the path to search for files to remove |
[in] | rmFilter | only files that include the filter will be removed |
Copyright 2014 Google Inc. All rights reserved.