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

  // Clear previous records first.
  Clear();

  // Read hostinfo from file and inserted it into hashtable.
  HostInfo info;
  while (fread(&info, sizeof(HostInfo), 1, file) == 1) {
    VisitHost(info.name, info.visit_count);
  }

  fclose(file);
  return true;
}
// Loads a table from file.
Loads a table from file.
Loads a table from file .
bool HostTable::Load(const char* path) {
  FILE* file = fopen(path, "rb");
  if (file == NULL) return false;
  Clear();
  HostInfo info;
  while (fread(&info, sizeof(HostInfo), 1, file) == 1) {
    VisitHost(info.name, info.visit_count);
  }
  fclose(file);
  return true;
}
bool HostTable :: Load ( const char * path ) { FILE * file = fopen ( path , " " ) ; if ( file == NULL ) return false ; Clear ( ) ; HostInfo info ; while ( fread ( & info , sizeof ( HostInfo ) , 1 , file ) == 1 ) { VisitHost ( info . name , info . visit_count ) ; } fclose ( file ) ; return true ; }
Loads a table from file.
Loads a table from file .
// Clear previous records first. // Read hostinfo from file and inserted it into hashtable.