package s3 import ( "context" "io" "os" "path" ) type File struct { fs *Fs key string r io.ReadCloser w io.WriteCloser cancel context.CancelFunc } // implements io.Closer func (f *File) Close() error { f.cancel() return nil } // implements io.Reader func (f *File) Read(b []byte) (int, error) { return f.r.Read(b) } // implements io.ReaderAt func (f *File) ReadAt(p []byte, off int64) (int, error) { panic("not implemented") } // implements io.Writer func (f *File) Write(p []byte) (int, error) { return f.w.Write(p) } // implements io.WriterAt func (f *File) WriteAt(p []byte, off int64) (int, error) { panic("not implemented") } func (f *File) Name() string { return path.Base(f.key) } func (f *File) Readdir(count int) ([]os.FileInfo, error) { panic("not implemented") } func (f *File) Readdirnames(n int) ([]string, error) { panic("not implemented") } func (f *File) Seek(offset int64, whence int) (int64, error) { panic("not implemented") } func (f *File) Stat() (os.FileInfo, error) { return f.fs.Stat(f.key) } func (f *File) Sync() error { panic("not implemented") } func (f *File) Truncate(size int64) error { panic("not implemented") } func (f *File) WriteString(s string) (ret int, err error) { panic("not implemented") }