thomasgenster/flysystem-sftp

Flysystem adapter for SFTP

1.0.12 2016-10-17 23:19 UTC

This package is not auto-updated.

Last update: 2024-04-22 09:41:03 UTC


README

Author Build Status Coverage Status Quality Score Software License Packagist Version Total Downloads

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' => 22,
    'username' => 'username',
    'password' => 'password',
    'privateKey' => 'path/to/or/contents/of/privatekey',
    'root' => '/path/to/root',
    'timeout' => 10,
    'agent' => true,
    'directoryPerm' => 0755
]);

$filesystem = new Filesystem($adapter);