Go to file
Nicola Murino 2489717da0
Merge pull request #535 from drakkan/errwrap
statusFromError: improve support for error wrapping
2023-01-04 09:27:18 +01:00
.github/workflows CI: add CIFuzz integration 2022-11-22 03:16:20 -08:00
examples Apply gofmt 2021-08-20 21:32:22 +02:00
internal/encoding/ssh/filexfer document the weirdness of the reversal of arguments to SSH_FXP_SYMLINK 2022-09-29 08:51:09 +00:00
server_standalone server_standalone: handle readonly properly 2017-03-15 12:45:09 -07:00
.gitignore split benchmark and benchmark_w_memprofile, include memprofile files to gitignore 2021-03-17 20:17:15 +00:00
CONTRIBUTORS Adding myself as I'm helping out 2017-01-06 17:20:11 -08:00
LICENSE Rename LICENCE to LICENSE 2014-10-27 21:31:41 +00:00
Makefile split benchmark and benchmark_w_memprofile, include memprofile files to gitignore 2021-03-17 20:17:15 +00:00
README.md update documentation links 2021-01-20 13:52:30 +01:00
allocator.go the allocator can now be enabled per request 2020-03-18 09:36:07 +01:00
allocator_test.go the allocator can now be enabled per request 2020-03-18 09:36:07 +01:00
attrs.go exploit the embedded FileStat in fileInfo 2021-08-11 13:20:30 +00:00
attrs_stubs.go no need for excluding based on CGO here 2021-08-11 13:11:37 +00:00
attrs_test.go collect all marshal/unmarshal functions into packet.go 2021-08-11 11:12:34 +00:00
attrs_unix.go js's Stat_t conforms to attrs_unix.go 2021-08-11 15:11:37 +00:00
client.go an even better error message 2022-07-11 11:34:22 +00:00
client_integration_darwin_test.go fix lint issues 2019-08-30 17:04:37 +02:00
client_integration_linux_test.go New method Client.Extensions to list server extensions 2020-10-23 11:16:44 +02:00
client_integration_test.go writeToSequential: improve tests for write errors 2022-03-03 12:30:24 +01:00
client_test.go collect all marshal/unmarshal functions into packet.go 2021-08-11 11:12:34 +00:00
conn.go more context for EOF during client setup 2022-06-29 12:13:03 +00:00
debug.go added debug option, build/test with -tags debug to activate 2014-09-28 12:32:34 +10:00
example_test.go Improve benchmarks and errors 2021-03-17 11:03:51 +00:00
fuzz.go really fix the fuzzer 2021-03-23 21:47:04 +01:00
go.mod go.mod: update crypto dependency to the latest tagged version 2022-10-20 07:47:26 +02:00
go.sum go.mod: update crypto dependency to the latest tagged version 2022-10-20 07:47:26 +02:00
ls_formatting.go NameLookupFileLister so that RequestServer does not automatically lookup system usernames 2021-08-17 11:40:30 +00:00
ls_formatting_test.go NameLookupFileLister so that RequestServer does not automatically lookup system usernames 2021-08-17 11:40:30 +00:00
ls_plan9.go NameLookupFileLister so that RequestServer does not automatically lookup system usernames 2021-08-17 11:40:30 +00:00
ls_stub.go refactor ls formatting work 2021-08-11 15:09:43 +00:00
ls_unix.go NameLookupFileLister so that RequestServer does not automatically lookup system usernames 2021-08-17 11:40:30 +00:00
match.go Fix Glob handling of backslashes 2021-03-15 18:11:02 +01:00
packet-manager.go pack structures so they have less size 2020-09-08 10:18:15 +02:00
packet-manager_test.go MarshalBinary now gives a 4-byte header for length, marshalPacket gives a two-stage write 2021-02-22 12:04:43 +00:00
packet-typing.go Use go errors instead of github.com/pkg/errors 2021-06-04 14:18:41 -07:00
packet.go Refactor tests and make `toLocalPath` a method on `Server` 2022-10-18 18:17:45 +03:00
packet_test.go collect all marshal/unmarshal functions into packet.go 2021-08-11 11:12:34 +00:00
pool.go actually, why not a better safe-guard 2021-07-02 08:49:51 +00:00
release.go added debug option, build/test with -tags debug to activate 2014-09-28 12:32:34 +10:00
request-attrs.go collect all marshal/unmarshal functions into packet.go 2021-08-11 11:12:34 +00:00
request-attrs_test.go minor improvements to some test cases 2022-10-16 16:06:46 +02:00
request-errors.go Lowercase error messages 2021-03-20 20:35:04 +01:00
request-example.go request-server: Introduce ReadlinkFileLister 2022-10-14 17:17:08 +02:00
request-interfaces.go request-server: Introduce ReadlinkFileLister 2022-10-14 17:17:08 +02:00
request-plan9.go Refactor tests and make `toLocalPath` a method on `Server` 2022-10-18 18:17:45 +03:00
request-readme.md update Request structure docs for path and flag changes 2018-01-04 13:30:43 -08:00
request-server.go RealPathFileLister: allow to return an error 2022-07-16 09:55:51 +02:00
request-server_test.go minor improvements to some test cases 2022-10-16 16:06:46 +02:00
request-unix.go Refactor tests and make `toLocalPath` a method on `Server` 2022-10-18 18:17:45 +03:00
request.go request-server: Introduce ReadlinkFileLister 2022-10-14 17:17:08 +02:00
request_test.go Refactor tests and make `toLocalPath` a method on `Server` 2022-10-18 18:17:45 +03:00
request_windows.go Refactor tests and make `toLocalPath` a method on `Server` 2022-10-18 18:17:45 +03:00
server.go statusFromError: improve support for error wrapping 2022-12-25 17:21:42 +01:00
server_integration_test.go remove racing stdout 2022-01-31 21:25:18 +00:00
server_nowindows_test.go Fix PR comments (build tags, %q) 2022-10-18 19:36:12 +03:00
server_plan9.go Fix PR comments (build tags, %q) 2022-10-18 19:36:12 +03:00
server_statvfs_darwin.go add serverside StatVFS function, implemented for darwin and linux (#89) 2016-06-13 14:45:13 +10:00
server_statvfs_impl.go missing ID passthru on statfs 2021-09-05 02:35:25 +00:00
server_statvfs_linux.go Remove gccgo special cases 2018-02-02 15:01:09 -05:00
server_statvfs_plan9.go pointer receivers and statusFromError(uint32, error) 2021-02-22 12:11:42 +00:00
server_statvfs_stubs.go pointer receivers and statusFromError(uint32, error) 2021-02-22 12:11:42 +00:00
server_test.go refactor ls formatting work 2021-08-11 15:09:43 +00:00
server_unix.go Refactor tests and make `toLocalPath` a method on `Server` 2022-10-18 18:17:45 +03:00
server_windows.go Refactor tests and make `toLocalPath` a method on `Server` 2022-10-18 18:17:45 +03:00
server_windows_test.go Fix PR comments (build tags, %q) 2022-10-18 19:36:12 +03:00
sftp.go Use go errors instead of github.com/pkg/errors 2021-06-04 14:18:41 -07:00
sftp_test.go statusFromError: improve support for error wrapping 2022-12-25 17:21:42 +01:00
stat_plan9.go resolve corner-case os.ModeType handling 2021-08-11 13:10:07 +00:00
stat_posix.go Translate EACCES to PERMISSION_DENIED. 2021-10-30 09:02:56 +02:00
syscall_fixed.go fix S_IFMT value on windows and plan9 2020-01-02 12:59:24 -08:00
syscall_good.go fix S_IFMT value on windows and plan9 2020-01-02 12:59:24 -08:00

README.md

sftp

The sftp package provides support for file system operations on remote ssh servers using the SFTP subsystem. It also implements an SFTP server for serving files from the filesystem.

CI Status Go Reference

usage and examples

See https://pkg.go.dev/github.com/pkg/sftp for examples and usage.

The basic operation of the package mirrors the facilities of the os package.

The Walker interface for directory traversal is heavily inspired by Keith Rarick's fs package.

roadmap

  • There is way too much duplication in the Client methods. If there was an unmarshal(interface{}) method this would reduce a heap of the duplication.

contributing

We welcome pull requests, bug fixes and issue reports.

Before proposing a large change, first please discuss your change by raising an issue.

For API/code bugs, please include a small, self contained code example to reproduce the issue. For pull requests, remember test coverage.

We try to handle issues and pull requests with a 0 open philosophy. That means we will try to address the submission as soon as possible and will work toward a resolution. If progress can no longer be made (eg. unreproducible bug) or stops (eg. unresponsive submitter), we will close the bug.

Thanks.