PHPackages                             coercive/sftp - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. coercive/sftp

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

coercive/sftp
=============

Coercive SFTP

0.0.0(3y ago)04MITPHP &gt;=7.4

Since Apr 24Pushed 3y ago1 watchersCompare

[ Source](https://github.com/Coercive/SFTP)[ Packagist](https://packagist.org/packages/coercive/sftp)[ Docs](http://coercive.fr)[ RSS](/packages/coercive-sftp/feed)WikiDiscussions main Synced today

READMEChangelog (1)DependenciesVersions (2)Used By (0)

SFTP
====

[](#sftp)

SFTP utility for PHP

Get
---

[](#get)

```
composer require coercive/sftp

```

Dependencies
------------

[](#dependencies)

This package use `ext-ssh2` : [manual](https://www.php.net/manual/en/ref.ssh2.php)

Usage
-----

[](#usage)

Connect to FTP

```
use Coercive\Utility\SFTP\SFTP;

$SFtp = new SFTP('127.0 0.1', 22);
$SFtp->login('BestUser', 'BestPassword');
$SFtp->connect();
```

Disconnect

```
$SFtp->disconnect();
```

Create directory

```
$SFtp->mkdir('/example/dir/test');
```

List diretories and files

```
$data = $SFtp->list('/example/dir/test');
```

Upload file

```
$SFtp->upload('/README.md', '/example/dir/test/test.md');
```

Download file

```
$SFtp->download('/example/dir/test/test.md', '/test/dowloaded_file.md');
```

Download file : with auto tmp name and prefix

```
$SFtp->setTmpPrefix('_test_tmp_prefix_');
$SFtp->download('/example/dir/test/test.md', $filepath);

# do something with your file
rename($filepath, '/test/dowloaded_file.md');
```

Filesize

```
$integer = $SFtp->filesize('/example/dir/test/test.md');
```

Read file

```
$data = $SFtp->read('/example/dir/test/test.md');
```

Write into file

```
$SFtp->write('/example/dir/test/test.md', "# Hello World !\n");
```

Remove file

```
$SFtp->delete('/example/dir/test/test.md');
```

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1165d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/20288080?v=4)[Coercive](/maintainers/Coercive)[@Coercive](https://github.com/Coercive)

---

Top Contributors

[![Coercive](https://avatars.githubusercontent.com/u/20288080?v=4)](https://github.com/Coercive "Coercive (2 commits)")

### Embed Badge

![Health badge](/badges/coercive-sftp/health.svg)

```
[![Health](https://phpackages.com/badges/coercive-sftp/health.svg)](https://phpackages.com/packages/coercive-sftp)
```

###  Alternatives

[umpirsky/symfony-upgrade-fixer

Analyzes your Symfony project and tries to make it compatible with the new version of Symfony framework.

273492.9k](/packages/umpirsky-symfony-upgrade-fixer)[bitbag/shipping-export-plugin

Shipping data export environment for Sylius platform applications

32117.4k18](/packages/bitbag-shipping-export-plugin)[imi/laravel-transsid

Trans\_SID (Session IDs in URLs) for Laravel 5-8 Projects

183.5k](/packages/imi-laravel-transsid)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
