// We assume that uri is uid: URI public void Remove(Uri uri) { driver.Remove(uri); Guid uid = GuidFu.FromUri(uri); name_index.Remove(uid); }
// We assume that // (a) old_uri is a uid: URI // (b) new_uri is a file: URI // (c) new_uri's filename is meaningful public void Rename(Uri old_uri, Uri new_uri) { Guid uid = GuidFu.FromUri(old_uri); string name = FileSystem.GetFileName(new_uri.LocalPath); name_index.Add(uid, name); renamed_uris.Add(old_uri); renamed_uris.Add(new_uri); }
// We assume that // (a) indexable.Uri is a uid: URI // (b) indexable.ContentUri is a file: URI // (c) indexable.ContentUri's filename is meaningful (i.e. isn't a temporary file) public void Add(Indexable indexable) { driver.Add(indexable); Guid uid = GuidFu.FromUri(indexable.Uri); string name = FileSystem.GetFileName(indexable.ContentUri.LocalPath); name_index.Add(uid, name); }