8000 add note in Create() docs about AWS + O_RDWR · etherscan-io/sftp@8067637 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8067637

Browse files
committed
add note in Create() docs about AWS + O_RDWR
1 parent 84e6527 commit 8067637

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

client.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,10 @@ type Client struct {
167167
// already exists. If successful, methods on the returned File can be used for
168168
// I/O; the associated file descriptor has mode O_RDWR. If you need more
169169
// control over the flags/mode used to open the file see client.OpenFile.
170+
//
171+
// Note that some SFTP servers (eg. AWS Transfer) do not support opening files
172+
// read/write at the same time. For those services you will need to use
173+
// `client.OpenFile(os.O_WRONLY|os.O_CREATE|os.O_TRUNC)`.
170174
func (c *Client) Create(path string) (*File, error) {
171175
return c.open(path, flags(os.O_RDWR|os.O_CREATE|os.O_TRUNC))
172176
}

0 commit comments

Comments
 (0)
0