@@ -5,6 +5,7 @@ package s3fs
5
5
6
6
import (
7
7
"context"
8
+ "errors"
8
9
"log"
9
10
10
11
"github.com/aws/aws-sdk-go-v2/aws"
@@ -30,15 +31,15 @@ func NewS3Client(config *aws.Config) *S3Client {
30
31
}
31
32
32
33
func (c S3Client ) Read (ctx context.Context , conn * connparse.Connection , data wshrpc.FileData ) (* wshrpc.FileData , error ) {
33
- return nil , nil
34
+ return nil , errors . ErrUnsupported
34
35
}
35
36
36
37
func (c S3Client ) ReadStream (ctx context.Context , conn * connparse.Connection , data wshrpc.FileData ) <- chan wshrpc.RespOrErrorUnion [wshrpc.FileData ] {
37
- return nil
38
+ return wshutil. SendErrCh [wshrpc. FileData ]( errors . ErrUnsupported )
38
39
}
39
40
40
41
func (c S3Client ) ReadTarStream (ctx context.Context , conn * connparse.Connection , opts * wshrpc.FileCopyOpts ) <- chan wshrpc.RespOrErrorUnion [iochantypes.Packet ] {
41
- return nil
42
+ return wshutil. SendErrCh [iochantypes. Packet ]( errors . ErrUnsupported )
42
43
}
43
44
44
45
func (c S3Client ) ListEntriesStream (ctx context.Context , conn * connparse.Connection , opts * wshrpc.FileListOpts ) <- chan wshrpc.RespOrErrorUnion [wshrpc.CommandRemoteListEntriesRtnData ] {
@@ -83,39 +84,39 @@ func (c S3Client) ListEntries(ctx context.Context, conn *connparse.Connection, o
83
84
}
84
85
85
86
func (c S3Client ) Stat (ctx context.Context , conn * connparse.Connection ) (* wshrpc.FileInfo , error ) {
86
- return nil , nil
87
+ return nil , errors . ErrUnsupported
87
88
}
88
89
89
90
func (c S3Client ) PutFile (ctx context.Context , conn * connparse.Connection , data wshrpc.FileData ) error {
90
- return nil
91
+ return errors . ErrUnsupported
91
92
}
92
93
93
94
func (c S3Client ) AppendFile (ctx context.Context , conn * connparse.Connection , data wshrpc.FileData ) error {
94
- return nil
95
+ return errors . ErrUnsupported
95
96
}
96
97
97
98
func (c S3Client ) Mkdir (ctx context.Context , conn * connparse.Connection ) error {
98
- return nil
99
+ return errors . ErrUnsupported
99
100
}
100
101
101
102
func (c S3Client ) MoveInternal (ctx context.Context , srcConn , destConn * connparse.Connection , opts * wshrpc.FileCopyOpts ) error {
102
- return nil
103
+ return errors . ErrUnsupported
103
104
}
104
105
105
106
func (c S3Client ) CopyRemote (ctx context.Context , srcConn , destConn * connparse.Connection , srcClient fstype.FileShareClient , opts * wshrpc.FileCopyOpts ) error {
106
- return nil
107
+ return errors . ErrUnsupported
107
108
}
108
109
109
110
func (c S3Client ) CopyInternal (ctx context.Context , srcConn , destConn * connparse.Connection , opts * wshrpc.FileCopyOpts ) error {
110
- return nil
111
+ return errors . ErrUnsupported
111
112
}
112
113
113
114
func (c S3Client ) Delete (ctx context.Context , conn * connparse.Connection , recursive bool ) error {
114
- return nil
115
+ return errors . ErrUnsupported
115
116
}
116
117
117
118
func (c S3Client ) Join (ctx context.Context , conn * connparse.Connection , parts ... string ) (string , error ) {
118
- return "" , nil
119
+ return "" , errors . ErrUnsupported
119
120
}
120
121
121
122
func (c S3Client ) GetConnectionType () string {
0 commit comments