refactor opening files/dirs in request-server

Minor version bump due to a pretty heavy refactoring of the
request-server's handing of open packets. It now calls through to the
handler to initialize the reader/writer/lister objects when it receives
the open packet. This should be transparent and was done in relation to
a bug fix, but it is a pretty major refactor so the minor version bump.

Fixed #280; Request.WithContext() deadlock when called from handler
-----BEGIN PGP SIGNATURE-----

iQEzBAABCgAdFiEEzPhKluB/h4GYxGUCPZqeWROpRaIFAlxY/ycACgkQPZqeWROp
RaJLSQf+LzXhkftQ6yinpxy2QNT16NmmSa7d/0TUnkBEMX5oOhdrbtDSYp280JR9
4yvujGQgeUVGm7oS+c3iN2Jd3kpMHUkMXNRL2mOGjhf8VYGdpf14BFDjvnc+ZLon
MuNRsG8ZRHrpZkrpOxkUn3Ol1MyuSmRgQTl5zGNYLLBym4LWhpM5XKernTQerH8T
04LZ5Jc8kjZ+hDXEYmU8du/C++2kyqtsu7VbzviNVoiLSQNlZ7r8kZvu3Xbm6jD7
N7lLH9J5k2J9ZAx8aNsKdn17LGIJWEEWnJGpGqjRa5c8diXYOpLtMbI+YkGdPS1V
er7vsCWiDUrxsrPB3Aj4kV42JTUcog==
=pKBX
-----END PGP SIGNATURE-----
Merge pull request #283 from pkg/open-on-open

Initialize opening of files/directories upon receiving open packets
tree: 615a6517b164a2a3a353fca86fd8e69126950ac7
  1. .gitignore
  2. .travis.yml
  3. CONTRIBUTORS
  4. LICENSE
  5. README.md
  6. attrs.go
  7. attrs_stubs.go
  8. attrs_test.go
  9. attrs_unix.go
  10. client.go
  11. client_integration_darwin_test.go
  12. client_integration_linux_test.go
  13. client_integration_test.go
  14. client_test.go
  15. conn.go
  16. debug.go
  17. example_test.go
  18. examples/
  19. match.go
  20. other_test.go
  21. packet-manager.go
  22. packet-manager_test.go
  23. packet-typing.go
  24. packet.go
  25. packet_test.go
  26. release.go
  27. request-attrs.go
  28. request-attrs_test.go
  29. request-errors.go
  30. request-example.go
  31. request-interfaces.go
  32. request-readme.md
  33. request-server.go
  34. request-server_test.go
  35. request-unix.go
  36. request.go
  37. request_test.go
  38. request_windows.go
  39. server.go
  40. server_integration_test.go
  41. server_standalone/
  42. server_statvfs_darwin.go
  43. server_statvfs_impl.go
  44. server_statvfs_linux.go
  45. server_statvfs_stubs.go
  46. server_stubs.go
  47. server_test.go
  48. server_unix.go
  49. sftp.go
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.