mirror of https://github.com/spf13/afero.git
rclone: readfile deleted
This commit is contained in:
parent
d3cdf0c871
commit
259d3109dc
|
@ -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)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue