MCPcopy Create free account
hub / github.com/plexdrive/plexdrive / Lookup

Method Lookup

mount/mount.go:301–309  ·  view source on GitHub ↗

Lookup tests if a file is existent in the current directory

(ctx context.Context, name string)

Source from the content-addressed store, hash-verified

299
300// Lookup tests if a file is existent in the current directory
301func (o Object) Lookup(ctx context.Context, name string) (fs.Node, error) {
302 object, err := o.fs.client.GetObjectByParentAndName(o.objectID, name)
303 if nil != err {
304 Log.Tracef("%v", err)
305 return nil, fuse.ENOENT
306 }
307
308 return o.fs.NewObject(object), nil
309}
310
311// Read reads some bytes or the whole file
312func (o Object) Read(ctx context.Context, req *fuse.ReadRequest, resp *fuse.ReadResponse) error {

Callers 1

mainFunction · 0.80

Calls 2

NewObjectMethod · 0.80

Tested by

no test coverage detected