PHPackages                             depage/fs - 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. [File &amp; Storage](/categories/file-storage)
4. /
5. depage/fs

ActiveLibrary[File &amp; Storage](/categories/file-storage)

depage/fs
=========

fs

011PHP

Since Oct 16Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/depage/depage-fs)[ Packagist](https://packagist.org/packages/depage/fs)[ RSS](/packages/depage-fs/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

depage-fs
=========

[](#depage-fs)

Transparent, protocol independent, local and remote file system operations.

Abstract virtual-file-system-like behavior across local file systems and remote protocols. With a syntax analogue to FTP-clients (put, get) depage-fs makes PHP stream wrappers easily accessible and provides a unified user interface.

Usage follows a local-remote paradigm where 'local' means the actual current working directory and 'remote' can be another local directory or a directory on a remote system.

depage-fs virtually tracks the remote working directory (cd, pwd). Once the remote path is set, it prevents any operations in parent directories.

Features
========

[](#features)

List of operations
------------------

[](#list-of-operations)

pwd, ls, lsDir, lsFiles, exists, fileInfo, cd, mkdir, rm, mv, get, put, getString, putString

Protocols
---------

[](#protocols)

local, ftp(s), ssh (authentication by password or key)

Example
-------

[](#example)

File transfer, local to remote

```
$fs = Fs::factory('ftp://user:pass@host/');

$fs->mkdir('new/path');
$fs->cd('new/path');
$fs->put('file.zip');
```

First, get the SSH fingerprint...

```
$fs = Fs::factory('ssh://host');
$print = $fs->getFingerprint();
```

then connect with SSH key

```
$params = array(
    'user'              => 'user',
    'pass'              => 'pass',
    'privateKeyFile'    => '.ssh/id_rsa',
    'fingerprint'       => $print,
    'tmp'               => '.'
);

$fs = Fs::factory('ssh://host', $params);
$fs->get('/home/user/file.zip');
```

Notes on usage
--------------

[](#notes-on-usage)

- depage-fs error handler converts any file system operation errors/warnings to exceptions. The problem causing them may be in a location different to the one stated in the exception.
- !!! Important in FTPS !!! If the server does not support SSL, then the connection falls back to regular unencrypted FTP. Currently there is no way to make sure the connection is encrypted. Susceptible to MITM attacks!
- SSH keys need to be PEM-formatted (base64).
- SSH keys can be strings or files. However, internally php requires key files (for some strange reason, both public and private). The files are automatically generated (and subsequently deleted) in a temporary directory specified by the 'tmp'-parameter.

License (dual)
--------------

[](#license-dual)

- GPL2:
- MIT:

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance52

Moderate activity, may be stable

Popularity2

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/98fa871aefc695ca207a9972094d72b38a2e49071eb1e3807077b231d4742e77?d=identicon)[jonasjonas](/maintainers/jonasjonas)

---

Top Contributors

[![jonasjonas](https://avatars.githubusercontent.com/u/112114?v=4)](https://github.com/jonasjonas "jonasjonas (24 commits)")

### Embed Badge

![Health badge](/badges/depage-fs/health.svg)

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

###  Alternatives

[knplabs/gaufrette

PHP library that provides a filesystem abstraction layer

2.5k39.8M123](/packages/knplabs-gaufrette)[google/cloud-storage

Cloud Storage Client for PHP

34390.8M125](/packages/google-cloud-storage)[illuminate/filesystem

The Illuminate Filesystem package.

15261.6M2.6k](/packages/illuminate-filesystem)[superbalist/flysystem-google-storage

Flysystem adapter for Google Cloud Storage

26320.6M30](/packages/superbalist-flysystem-google-storage)[creocoder/yii2-flysystem

The flysystem extension for the Yii framework

2931.7M62](/packages/creocoder-yii2-flysystem)[flowjs/flow-php-server

PHP library for handling chunk uploads. Works with flow.js html5 file uploads.

2451.6M15](/packages/flowjs-flow-php-server)

PHPackages © 2026

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