private void ClearFilesAndIndex() { var files = _driver.Enum().ToArray(); foreach (var file in files.Where(x => _index.Get(new StorageItem { FileName = x }) == null)) { _driver.Remove(file); } foreach (var file in _index.Items.Where(x => !files.Contains(x.FileName)).ToArray()) { _index.Remove(file); } }
public void Remove(string name) { _driver.Remove(GetNameWithExtention(name)); }