Remove marks the entry for path as deleted.
(path string)
| 76 | |
| 77 | // Remove marks the entry for path as deleted. |
| 78 | func (idx *Index) Remove(path string) bool { |
| 79 | norm := string(normalizePathBytes([]byte(path))) |
| 80 | id, ok := idx.byPath[norm] |
| 81 | if !ok { |
| 82 | return false |
| 83 | } |
| 84 | idx.deleted[id] = true |
| 85 | delete(idx.byPath, norm) |
| 86 | return true |
| 87 | } |
| 88 | |
| 89 | // Has reports whether path exists (not deleted) in the index. |
| 90 | func (idx *Index) Has(path string) bool { |