nginxsonarrradarrplexorganizrdashboardnzbgetbookmarkapplication-dashboardmuximuxlandingpagestartpagelandinghtpcserverhomepagesabnzbdheimdallembycouchpotato
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
520 B
31 lines
520 B
7 years ago
|
---
|
||
|
layout: default
|
||
|
permalink: /adapter/sftp/
|
||
|
title: SFTP Adapter
|
||
|
---
|
||
|
|
||
|
# SFTP Adapter
|
||
|
|
||
|
## Installation
|
||
|
|
||
|
~~~ bash
|
||
|
composer require league/flysystem-sftp
|
||
|
~~~
|
||
|
|
||
|
## Usage
|
||
|
|
||
|
~~~ php
|
||
|
use League\Flysystem\Filesystem;
|
||
|
use League\Flysystem\Sftp\SftpAdapter;
|
||
|
|
||
|
$filesystem = new Filesystem(new SftpAdapter([
|
||
|
'host' => 'example.com',
|
||
|
'port' => 21,
|
||
|
'username' => 'username',
|
||
|
'password' => 'password',
|
||
|
'privateKey' => 'path/to/or/contents/of/privatekey',
|
||
|
'root' => '/path/to/root',
|
||
|
'timeout' => 10,
|
||
|
]));
|
||
|
~~~
|