mirror of
https://github.com/rclone/rclone.git
synced 2025-12-11 22:14:05 +01:00
vfs: Add go-billy dependency and make sure vfs.Handle implements billy.File
billy defines a common file system interface that is used in multiple go packages. vfs.Handle implements billy.File mostly, only two methods needed to be added to make it compliant. An interface check is added as well. This is a preliminary work for adding serve nfs command.
This commit is contained in:
committed by
Nick Craig-Wood
parent
7801b160f2
commit
25f59b2918
@@ -30,6 +30,16 @@ type RWFileHandle struct {
|
||||
writeCalled bool // if any Write() methods have been called
|
||||
}
|
||||
|
||||
// Lock performs Unix locking, not supported
|
||||
func (fh *RWFileHandle) Lock() error {
|
||||
return os.ErrInvalid
|
||||
}
|
||||
|
||||
// Unlock performs Unix unlocking, not supported
|
||||
func (fh *RWFileHandle) Unlock() error {
|
||||
return os.ErrInvalid
|
||||
}
|
||||
|
||||
func newRWFileHandle(d *Dir, f *File, flags int) (fh *RWFileHandle, err error) {
|
||||
defer log.Trace(f.Path(), "")("err=%v", &err)
|
||||
// get an item to represent this from the cache
|
||||
|
||||
Reference in New Issue
Block a user