Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ func newClientPipe(rd, stderr io.Reader, wr io.WriteCloser, wait func() error, o
// Create creates the named file mode 0666 (before umask), truncating it if it
// already exists. If successful, methods on the returned File can be used for
// I/O; the associated file descriptor has mode O_RDWR. If you need more
// control over the flags/mode used to open the file see client.OpenFile.
// control over the flags/mode used to open the file, see [Client.OpenFile].
//
// Note that some SFTP servers (eg. AWS Transfer) do not support opening files
// read/write at the same time. For those services you will need to use
Expand Down Expand Up @@ -1033,8 +1033,8 @@ func (c *Client) MkdirAll(path string) error {
return nil
}

// RemoveAll delete files recursively in the directory and Recursively delete subdirectories.
// An error will be returned if no file or directory with the specified path exists
// RemoveAll delete files recursively in the directory and recursively delete subdirectories.
// An error will be returned if no file or directory with the specified path exists.
func (c *Client) RemoveAll(path string) error {

// Get the file/directory information
Expand Down Expand Up @@ -2142,7 +2142,7 @@ func (f *File) Chown(uid, gid int) error {

// Chmod changes the permissions of the current file.
//
// See Client.Chmod for details.
// See [Client.Chmod] for details.
func (f *File) Chmod(mode os.FileMode) error {
f.mu.RLock()
defer f.mu.RUnlock()
Expand Down
4 changes: 2 additions & 2 deletions request-attrs.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package sftp
// Attr(ibutes) byte blob easier. Use Pflags() when working with an Open/Write
// request and AttrFlags() and Attributes() when working with SetStat requests.

// FileOpenFlags defines Open and Write Flags. Correlate directly with with os.OpenFile flags
// FileOpenFlags defines Open and Write Flags. Correlate directly with os.OpenFile flags
// (https://golang.org/pkg/os/#pkg-constants).
type FileOpenFlags struct {
Read, Write, Append, Creat, Trunc, Excl bool
Expand Down Expand Up @@ -44,7 +44,7 @@ func newFileAttrFlags(flags uint32) FileAttrFlags {
}

// AttrFlags returns a FileAttrFlags boolean struct based on the
// bitmap/uint32 file attribute flags from the SFTP packaet.
// bitmap/uint32 file attribute flags from the SFTP packet.
func (r *Request) AttrFlags() FileAttrFlags {
return newFileAttrFlags(r.Flags)
}
Expand Down
6 changes: 3 additions & 3 deletions request-interfaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ type WriterAtReaderAt interface {
// The request.Method attribute is initially the most important one as it
// determines which Handler gets called.

// FileReader should return an io.ReaderAt for the filepath
// FileReader should return an io.ReaderAt for the filepath.
// Note in cases of an error, the error text will be sent to the client.
// Called for Methods: Get
type FileReader interface {
Expand Down Expand Up @@ -48,7 +48,7 @@ type OpenFileWriter interface {
OpenFile(*Request) (WriterAtReaderAt, error)
}

// FileCmder should return an error
// FileCmder should return an error.
// Note in cases of an error, the error text will be sent to the client.
// Called for Methods: Setstat, Rename, Rmdir, Mkdir, Link, Symlink, Remove
type FileCmder interface {
Expand All @@ -71,7 +71,7 @@ type StatVFSFileCmder interface {
StatVFS(*Request) (*StatVFS, error)
}

// FileLister should return an object that fulfils the ListerAt interface
// FileLister should return an object that fulfils the ListerAt interface.
// Note in cases of an error, the error text will be sent to the client.
// Called for Methods: List, Stat, Readlink
//
Expand Down