Go to file
John Eikenberry 43a60a90f4
Merge pull request #303 from drakkan/extensions
define supported extensions in one place and use for both server and …
2019-08-29 14:10:45 -07:00
examples sftp: update tests to finish and not panic on windows 2019-01-18 16:29:07 -08:00
server_standalone server_standalone: handle readonly properly 2017-03-15 12:45:09 -07:00
.gitignore ignore test keys in all examples 2017-06-29 14:48:40 -07:00
.travis.yml update versions to ignore on macOS 2019-08-25 20:59:02 -07: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
README.md soften contrib text a bit 2017-04-25 15:30:31 -07:00
attrs.go Make request attribute structs public for docs 2018-05-11 14:15:09 -07:00
attrs_stubs.go add windows as a build target to _stubs.go files 2015-09-19 19:16:50 -07:00
attrs_test.go *: golint (part 1) 2016-01-07 12:10:24 -05:00
attrs_unix.go added build tags required for gcc-go on AIX 2018-07-26 16:04:57 +05:00
client.go Implement the hardlink@openssh.com extension. 2019-08-25 20:16:37 -07:00
client_integration_darwin_test.go sftp: update tests to finish and not panic on windows 2019-01-18 16:29:07 -08:00
client_integration_linux_test.go sftp: update tests to finish and not panic on windows 2019-01-18 16:29:07 -08:00
client_integration_test.go Implement the hardlink@openssh.com extension. 2019-08-25 20:16:37 -07:00
client_test.go Allow the use of packets smaller than 32768 bytes, and add MaxPacketChecked/Unchecked client options to prevent developers from accidentally using larger, potentially incompatible sizes. 2018-02-22 14:05:13 -08:00
conn.go Use channel to implement a simple way to wait 2018-12-05 16:30:09 +08:00
debug.go added debug option, build/test with -tags debug to activate 2014-09-28 12:32:34 +10:00
example_test.go Add example about ReadFrom + bufio interaction 2018-01-11 18:24:04 -08:00
go.mod update to use go modules 2019-08-25 18:40:38 -07:00
go.sum update to use go modules 2019-08-25 18:40:38 -07:00
match.go Fixes #188; eliminates duplicated core code 2017-07-20 15:28:11 -07:00
packet-manager.go prevent memory leaks in slice buffer 2018-11-20 16:35:28 -08:00
packet-manager_test.go ensure packet responses in same order as requests 2018-08-01 13:18:57 -07:00
packet-typing.go Implement the hardlink@openssh.com extension. 2019-08-25 20:16:37 -07:00
packet.go Implement the hardlink@openssh.com extension. 2019-08-25 20:16:37 -07:00
packet_test.go packet, server: use a single read-only check 2016-01-11 11:50:10 -05:00
release.go added debug option, build/test with -tags debug to activate 2014-09-28 12:32:34 +10:00
request-attrs.go Make request attribute structs public for docs 2018-05-11 14:15:09 -07:00
request-attrs_test.go Make request attribute structs public for docs 2018-05-11 14:15:09 -07:00
request-errors.go support handlers returning explicit error codes 2018-01-26 17:26:44 -08:00
request-example.go Implement the hardlink@openssh.com extension. 2019-08-25 20:16:37 -07:00
request-interfaces.go Implement the hardlink@openssh.com extension. 2019-08-25 20:16:37 -07:00
request-readme.md update Request structure docs for path and flag changes 2018-01-04 13:30:43 -08:00
request-server.go define supported extensions in one place and use for both server and request-server 2019-08-27 09:18:15 +02:00
request-server_test.go Implement the hardlink@openssh.com extension. 2019-08-25 20:16:37 -07:00
request-unix.go Revert "rename files with OS specific request test code" 2017-03-01 20:54:40 -08:00
request.go Implement the hardlink@openssh.com extension. 2019-08-25 20:16:37 -07:00
request_test.go add comment about purpose of context use in example/tests 2019-02-04 13:22:46 -08:00
request_windows.go Revert "rename files with OS specific request test code" 2017-03-01 20:54:40 -08:00
server.go define supported extensions in one place and use for both server and request-server 2019-08-27 09:18:15 +02:00
server_integration_test.go Implement the hardlink@openssh.com extension. 2019-08-25 20:16:37 -07: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 refactor server response to allow for extending 2018-07-25 15:01:43 -07:00
server_statvfs_linux.go Remove gccgo special cases 2018-02-02 15:01:09 -05:00
server_statvfs_stubs.go refactor server response to allow for extending 2018-07-25 15:01:43 -07:00
server_stubs.go Changed default user and group to root and count links for directories to 0 on non *nix systems 2017-08-10 12:10:05 +02:00
server_test.go sftp: update tests to finish and not panic on windows 2019-01-18 16:29:07 -08:00
server_unix.go added build tags required for gcc-go on AIX 2018-07-26 16:04:57 +05:00
sftp.go define supported extensions in one place and use for both server and request-server 2019-08-27 09:18:15 +02:00
sftpDebug.log gracefully handle unknown extended packets 2019-08-25 20:19:45 -07: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.

UNIX Build Status GoDoc

usage and examples

See godoc.org/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.