MCPcopy Index your code
hub / github.com/plexdrive/plexdrive / Remove

Method Remove

mount/mount.go:342–356  ·  view source on GitHub ↗

Remove deletes an element

(ctx context.Context, req *fuse.RemoveRequest)

Source from the content-addressed store, hash-verified

340
341// Remove deletes an element
342func (o Object) Remove(ctx context.Context, req *fuse.RemoveRequest) error {
343 object, err := o.fs.client.GetObjectByParentAndName(o.objectID, req.Name)
344 if nil != err {
345 Log.Warningf("%v", err)
346 return fuse.EIO
347 }
348
349 err = o.fs.client.Remove(object, o.objectID)
350 if nil != err {
351 Log.Warningf("%v", err)
352 return fuse.EIO
353 }
354
355 return nil
356}
357
358// Mkdir creates a new directory
359func (o Object) Mkdir(ctx context.Context, req *fuse.MkdirRequest) (fs.Node, error) {

Callers 1

PopMethod · 0.45

Calls 1

Tested by

no test coverage detected