andreybolonin / flysystem-sftp
Flysystem adapter for SFTP
1.0.6
2015-09-20 13:14 UTC
Requires
- php: >=5.4.0
- league/flysystem: ~1.0
- phpseclib/phpseclib: ~0.3.8
Requires (Dev)
- mockery/mockery: 0.9.*
- phpunit/phpunit: ~4.0
This package is not auto-updated.
Last update: 2024-11-13 10:36:59 UTC
README
This adapter uses phpseclib to provide a SFTP adapter for Flysystem.
Installation
composer require league/flysystem-sftp
Usage
use League\Flysystem\Sftp\SftpAdapter; use League\Flysystem\Filesystem; $adapter = new SftpAdapter([ 'host' => 'example.com', 'port' => 21, 'username' => 'username', 'password' => 'password', 'privateKey' => 'path/to/or/contents/of/privatekey', 'root' => '/path/to/root', 'timeout' => 10, 'directoryPerm' => 0755 ]); $filesystem = new Filesystem($adapter);