Has reports whether path exists (not deleted) in the index.
(path string)
| 88 | |
| 89 | // Has reports whether path exists (not deleted) in the index. |
| 90 | func (idx *Index) Has(path string) bool { |
| 91 | _, ok := idx.byPath[string(normalizePathBytes([]byte(path)))] |
| 92 | return ok |
| 93 | } |
| 94 | |
| 95 | // Len returns the number of live (non-deleted) documents. |
| 96 | func (idx *Index) Len() int { return len(idx.byPath) } |