Geo General  1
 All Classes Files Functions Variables Pages
Functions
GeoFiles.h File Reference
#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...
 

Function Documentation

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.

Parameters
[in]searchPaththe path to search for files
[in]filteronly 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

Parameters
[in]rmPaththe path to search for files to remove
[in]rmFilteronly files that include the filter will be removed

Copyright 2014 Google Inc. All rights reserved.