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.
| 16 | // It will be open to a temporary file which, when closed, will be |
| 17 | // transferred to the remote. |
| 18 | type 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 |
| 34 | func (fh *RWFileHandle) Lock() error { |
nothing calls this directly
no outgoing calls
no test coverage detected