rclone: readfile deleted

This commit is contained in:
mkvolkov 2022-08-19 07:47:50 +03:00
parent d3cdf0c871
commit 259d3109dc
2 changed files with 2 additions and 8 deletions

View File

@ -131,13 +131,6 @@ func (rcfs *RCFS) Chtimes(name string, atime time.Time, mtime time.Time) error {
return rcfs.Fs.Chtimes(name, atime, mtime)
}
func (rcfs *RCFS) ReadFile(name string) ([]byte, error) {
name = rcfs.AbsPath(name)
return rcfs.Fs.ReadFile(name)
}

View File

@ -4,13 +4,14 @@ import (
"fmt"
"os"
"github.com/spf13/afero"
"github.com/spf13/afero/rclonefs"
)
func main() {
RFS, _ := rclonefs.CreateRCFS("godrive1:")
data, err := RFS.ReadFile("mock.json")
data, err := afero.ReadFile(RFS, "mock.json")
if err != nil {
fmt.Printf("Error: %v\n", err)
os.Exit(1)