MCPcopy
hub / github.com/opencloud-eu/opencloud / removeAttributes

Function removeAttributes

opencloud/pkg/command/posixfs.go:523–535  ·  view source on GitHub ↗
(path string)

Source from the content-addressed store, hash-verified

521}
522
523func removeAttributes(path string) error {
524 attrNames, err := xattr.List(path)
525 if err != nil {
526 return fmt.Errorf("failed to list attributes for '%s': %w", path, err)
527 }
528
529 for _, attrName := range attrNames {
530 if err := xattr.Remove(path, attrName); err != nil {
531 return fmt.Errorf("failed to remove attribute '%s' from '%s': %w", attrName, path, err)
532 }
533 }
534 return nil
535}
536
537func logFailure(message string, args ...any) {
538 spinner.StopFailMessage(fmt.Sprintf("\n"+message, args...))

Callers 1

setAllParentIDAttributesFunction · 0.85

Calls 2

ErrorfMethod · 0.80
ListMethod · 0.65

Tested by

no test coverage detected