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

Method Open

mount/mount.go:329–339  ·  view source on GitHub ↗

Open a file

(ctx context.Context, req *fuse.OpenRequest, resp *fuse.OpenResponse)

Source from the content-addressed store, hash-verified

327
328// Open a file
329func (o Object) Open(ctx context.Context, req *fuse.OpenRequest, resp *fuse.OpenResponse) (fs.Handle, error) {
330 if o.fs.directIO {
331 // Force use of Direct I/O, even if the app did not request it (direct_io mount option)
332 resp.Flags |= fuse.OpenDirectIO
333 }
334 if o.fs.client.NotifyFsChanges {
335 // We can actively invalidate kernel cache, use more aggressive caching
336 resp.Flags |= fuse.OpenKeepCache
337 }
338 return o, nil
339}
340
341// Remove deletes an element
342func (o Object) Remove(ctx context.Context, req *fuse.RemoveRequest) error {

Callers 1

NewCacheFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected