// Open a hash table file. func OpenHash(name string, path []string) (ht *HashTable, err error) { file, err := commonfile.Open(name, HT_FILE_SIZE) if err != nil { return } ht = &HashTable{File: file, Path: path, Mutex: &sync.RWMutex{}} ht.calculateSizeInfo() return ht, nil }
// Open a collection file. func OpenCol(name string) (*ColFile, error) { file, err := commonfile.Open(name, COL_FILE_SIZE) return &ColFile{File: file}, err }