Lookup tests if a file is existent in the current directory
(ctx context.Context, name string)
| 299 | |
| 300 | // Lookup tests if a file is existent in the current directory |
| 301 | func (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 |
| 312 | func (o Object) Read(ctx context.Context, req *fuse.ReadRequest, resp *fuse.ReadResponse) error { |
no test coverage detected