sunxyw / flysystem-sftp
Flysystem adapter for SFTP
2.0.2
2020-12-02 13:23 UTC
Requires
- php: ^7.2 || ^8.0
- league/flysystem: ^2.0.0
- league/mime-type-detection: ^1.0.0
- phpseclib/phpseclib: ^2.0
This package is auto-updated.
Last update: 2026-06-09 10:37:40 UTC
README
This adapter uses phpseclib to provide a SFTP adapter for Flysystem.
Installation
composer require league/flysystem-sftp
Documentation
Full documentation of this adapter can be found here: https://flysystem.thephpleague.com/adapter/sftp/
Usage
use League\Flysystem\Sftp\SftpAdapter; use League\Flysystem\Filesystem; $adapter = new SftpAdapter([ 'host' => 'example.com', 'port' => 22, 'username' => 'username', 'password' => 'password', 'privateKey' => 'path/to/or/contents/of/privatekey', 'passphrase' => 'passphrase-for-privateKey', 'root' => '/path/to/root', 'timeout' => 10, 'directoryPerm' => 0755 ]); $filesystem = new Filesystem($adapter);