MCPcopy
hub / github.com/rclone/rclone / RWFileHandle

Struct RWFileHandle

vfs/read_write.go:18–31  ·  view source on GitHub ↗

RWFileHandle is a handle that can be open for read and write. It will be open to a temporary file which, when closed, will be transferred to the remote.

Source from the content-addressed store, hash-verified

16// It will be open to a temporary file which, when closed, will be
17// transferred to the remote.
18type RWFileHandle struct {
19 // read only variables
20 file *File
21 d *Dir
22 flags int // open flags
23 item *vfscache.Item // cached file item
24
25 // read write variables protected by mutex
26 mu sync.Mutex
27 offset int64 // file pointer offset
28 closed bool // set if handle has been closed
29 opened bool
30 writeCalled bool // if any Write() methods have been called
31}
32
33// Lock performs Unix locking, not supported
34func (fh *RWFileHandle) Lock() error {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected