Skip to content

omnidrive/sftp API reference

Floor
Provider · Omnidrive
Version
1.x
Conformance suite
runs, CI green
Verified for real
Verified in part
Licence
MIT
composer require omnidrive/sftp:1.x-dev

Read from the package's own PHP files at the commit 206fff7d82de: its namespaces, classes, interfaces and enums, their public constants, properties and methods with their PHPDoc, and the options its factories take. Nothing of it is run.

Omnidrive\Sftp

  • SftpDriveFactory class

    A directory of an SFTP server, over SSH, through league/flysystem-sftp-v3 (phpseclib 3, pure PHP: no ssh2 extension):

    7 options

Omnidrive\Sftp

SftpDriveFactory class

final class SftpDriveFactory extends FlysystemDriveFactory SftpDriveFactory.php:26

A directory of an SFTP server, over SSH, through league/flysystem-sftp-v3 (phpseclib 3, pure PHP: no ssh2 extension):

(new SftpDriveFactory())->create(['host' => 'backup.example.org', 'username' => 'site', 'private_key' => '/run/secrets/id_ed25519', 'root' => '/srv/backup']);

Options: host and username (required), password, private_key (a path or the key itself) and its passphrase, use_agent (the SSH agent's keys), port (22), root (the directory behind the drive's paths, "/"), host_fingerprint (the server's key checked, "SHA256:..." or the MD5 form phpseclib gives), timeout (10 s), max_tries (4), public_url, visibility, directory_visibility, permissions (as every drive).

The connection is opened on the first operation, not here.

Options

OptionDefault
port22
root'/'
use_agentfalse
timeout10
max_tries4
hostrequired
usernamerequired