refactor: node deletion

This commit is contained in:
2025-11-30 01:16:44 +00:00
parent 629d56b5ab
commit 6984bb209e
10 changed files with 165 additions and 79 deletions

View File

@@ -111,6 +111,15 @@ func (s *FSStore) Delete(ctx context.Context, key Key) error {
return nil
}
func (s *FSStore) DeletePrefix(ctx context.Context, prefix Key) error {
prefixPath := filepath.Join(s.config.Root, string(prefix))
err := os.RemoveAll(prefixPath)
if err != nil && !os.IsNotExist(err) {
return err
}
return nil
}
func (s *FSStore) Update(ctx context.Context, key Key, opts UpdateOptions) error {
// Update is a no-op for FSStore
return nil