regionator.cc
// Determines whether a directory exists.
Determines whether a directory exists.
Determines whether a directory exists .
bool IsDirectory(const string &path) {
  struct stat file_stat;
  if (stat(path.c_str(), &file_stat) == 0) {
    return S_ISDIR(file_stat.st_mode);
  } else {
    return false;
  }
}
bool IsDirectory ( const string & path ) { struct stat file_stat ; if ( stat ( path . c_str ( ) , & file_stat ) == 0 ) { return S_ISDIR ( file_stat . st_mode ) ; } else { return false ; } }
Determines whether a directory exists.
Determines whether a directory exists .