src/sitemapservice/hosttable.cc
bool HostTable::Save(const char* path) const {
  FILE* file = fopen(path, "wb");
  if (file == NULL) return false;

  // Write hashtable entry to file.
  HashTable::const_iterator itr = hosts_.begin();
  for (; itr != hosts_.end(); ++itr) {
    if (fwrite(&(itr->second), sizeof(HostInfo), 1, file) != 1) {
      fclose(file);
      return false;
    }
  }

  fclose(file);
  return true;
}
// Writes this table to a file.
Writes this table to a file.
Writes this table to a file .
bool HostTable::Save(const char* path) const {
  FILE* file = fopen(path, "wb");
  if (file == NULL) return false;
  HashTable::const_iterator itr = hosts_.begin();
  for (; itr != hosts_.end(); ++itr) {
    if (fwrite(&(itr->second), sizeof(HostInfo), 1, file) != 1) {
      fclose(file);
      return false;
    }
  }
  fclose(file);
  return true;
}
bool HostTable :: Save ( const char * path ) const { FILE * file = fopen ( path , " " ) ; if ( file == NULL ) return false ; HashTable :: const_iterator itr = hosts_ . begin ( ) ; for ( ; itr != hosts_ . end ( ) ; ++ itr ) { if ( fwrite ( & ( itr -> second ) , sizeof ( HostInfo ) , 1 , file ) != 1 ) { fclose ( file ) ; return false ; } } fclose ( file ) ; return true ; }
Writes this table to a file.
Writes this table to a file .
// Write hashtable entry to file.