podman/vendor/github.com/pkg/sftp
Valentin Rothberg d5841ed528 add --module flag
Support a new concept in containers.conf called "modules".  A "module"
is a containers.conf file located at a specific directory.  More than
one module can be loaded in the specified order, following existing
override semantics.

There are three directories to load modules from:
 - $CONFIG_HOME/containers/containers.conf.modules
 - /etc/containers/containers.conf.modules
 - /usr/share/containers/containers.conf.modules

With CONFIG_HOME pointing to $HOME/.config or, if set, $XDG_CONFIG_HOME.
Absolute paths will be loaded as is, relative paths will be resolved
relative to the three directories above allowing for admin configs
(/etc/) to override system configs (/usr/share/) and user configs
($CONFIG_HOME) to override admin configs.

Pulls in containers/common/pull/1599.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-08-16 14:32:35 +02:00
..
internal/encoding/ssh/filexfer add --module flag 2023-08-16 14:32:35 +02:00
.gitignore podman ssh work, using new c/common interface 2022-08-09 14:00:58 -04:00
CONTRIBUTORS podman ssh work, using new c/common interface 2022-08-09 14:00:58 -04:00
LICENSE podman ssh work, using new c/common interface 2022-08-09 14:00:58 -04:00
Makefile podman ssh work, using new c/common interface 2022-08-09 14:00:58 -04:00
README.md podman ssh work, using new c/common interface 2022-08-09 14:00:58 -04:00
allocator.go podman ssh work, using new c/common interface 2022-08-09 14:00:58 -04:00
attrs.go add --module flag 2023-08-16 14:32:35 +02:00
attrs_stubs.go add --module flag 2023-08-16 14:32:35 +02:00
attrs_unix.go add --module flag 2023-08-16 14:32:35 +02:00
client.go add --module flag 2023-08-16 14:32:35 +02:00
conn.go add --module flag 2023-08-16 14:32:35 +02:00
debug.go add --module flag 2023-08-16 14:32:35 +02:00
fuzz.go add --module flag 2023-08-16 14:32:35 +02:00
ls_formatting.go add --module flag 2023-08-16 14:32:35 +02:00
ls_plan9.go add --module flag 2023-08-16 14:32:35 +02:00
ls_stub.go add --module flag 2023-08-16 14:32:35 +02:00
ls_unix.go add --module flag 2023-08-16 14:32:35 +02:00
match.go podman ssh work, using new c/common interface 2022-08-09 14:00:58 -04:00
packet-manager.go add --module flag 2023-08-16 14:32:35 +02:00
packet-typing.go add --module flag 2023-08-16 14:32:35 +02:00
packet.go add --module flag 2023-08-16 14:32:35 +02:00
pool.go podman ssh work, using new c/common interface 2022-08-09 14:00:58 -04:00
release.go add --module flag 2023-08-16 14:32:35 +02:00
request-attrs.go podman ssh work, using new c/common interface 2022-08-09 14:00:58 -04:00
request-errors.go podman ssh work, using new c/common interface 2022-08-09 14:00:58 -04:00
request-example.go add --module flag 2023-08-16 14:32:35 +02:00
request-interfaces.go add --module flag 2023-08-16 14:32:35 +02:00
request-plan9.go add --module flag 2023-08-16 14:32:35 +02:00
request-readme.md add --module flag 2023-08-16 14:32:35 +02:00
request-server.go add --module flag 2023-08-16 14:32:35 +02:00
request-unix.go add --module flag 2023-08-16 14:32:35 +02:00
request.go add --module flag 2023-08-16 14:32:35 +02:00
request_windows.go add --module flag 2023-08-16 14:32:35 +02:00
server.go add --module flag 2023-08-16 14:32:35 +02:00
server_plan9.go add --module flag 2023-08-16 14:32:35 +02:00
server_statvfs_darwin.go podman ssh work, using new c/common interface 2022-08-09 14:00:58 -04:00
server_statvfs_impl.go add --module flag 2023-08-16 14:32:35 +02:00
server_statvfs_linux.go add --module flag 2023-08-16 14:32:35 +02:00
server_statvfs_plan9.go podman ssh work, using new c/common interface 2022-08-09 14:00:58 -04:00
server_statvfs_stubs.go add --module flag 2023-08-16 14:32:35 +02:00
server_unix.go add --module flag 2023-08-16 14:32:35 +02:00
server_windows.go add --module flag 2023-08-16 14:32:35 +02:00
sftp.go add --module flag 2023-08-16 14:32:35 +02:00
stat_plan9.go podman ssh work, using new c/common interface 2022-08-09 14:00:58 -04:00
stat_posix.go podman ssh work, using new c/common interface 2022-08-09 14:00:58 -04:00
syscall_fixed.go add --module flag 2023-08-16 14:32:35 +02:00
syscall_good.go add --module flag 2023-08-16 14:32:35 +02: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.