diff --git a/sftpfs/file.go b/sftpfs/file.go index eef14e36..f5793559 100644 --- a/sftpfs/file.go +++ b/sftpfs/file.go @@ -53,7 +53,7 @@ func (f *File) Stat() (os.FileInfo, error) { } func (f *File) Sync() error { - return nil + return f.fd.Sync() } func (f *File) Truncate(size int64) error { @@ -64,9 +64,8 @@ func (f *File) Read(b []byte) (n int, err error) { return f.fd.Read(b) } -// TODO func (f *File) ReadAt(b []byte, off int64) (n int, err error) { - return 0, nil + return f.fd.ReadAt(b, off) } func (f *File) Readdir(count int) (res []os.FileInfo, err error) { @@ -101,9 +100,8 @@ func (f *File) Write(b []byte) (n int, err error) { return f.fd.Write(b) } -// TODO func (f *File) WriteAt(b []byte, off int64) (n int, err error) { - return 0, nil + return f.fd.WriteAt(b, off) } func (f *File) WriteString(s string) (ret int, err error) {