PHPackages                             fisharebest/flysystem-chroot-adapter - 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. fisharebest/flysystem-chroot-adapter

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

fisharebest/flysystem-chroot-adapter
====================================

Creates a filesystem from a sub-folder in another filesystem.

3.0.0(4y ago)242.2k↑67.3%MITPHP

Since Jan 17Pushed 3y ago1 watchersCompare

[ Source](https://github.com/fisharebest/flysystem-chroot-adapter)[ Packagist](https://packagist.org/packages/fisharebest/flysystem-chroot-adapter)[ Docs](https://github.com/fisharebest/flysystem-chroot-adapter)[ RSS](/packages/fisharebest-flysystem-chroot-adapter/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (5)Versions (6)Used By (0)

Flysystem Chroot Adapter
========================

[](#flysystem-chroot-adapter)

[![Author](https://camo.githubusercontent.com/dc95c17eac7b161466238292b9915f2ce88e89b092c2eb2ce8c57f260f39da3d/687474703a2f2f696d672e736869656c64732e696f2f62616467652f617574686f722d4066697368617265626573742d626c75652e7376673f7374796c653d666c61742d737175617265)](https://github.com/fisharebest)[![Latest Stable Version](https://camo.githubusercontent.com/45848b9da43175d52996ab0debad4cb6d043691c0717825c68797cbc71b1e91e/68747470733a2f2f706f7365722e707567782e6f72672f66697368617265626573742f666c7973797374656d2d6368726f6f742d616461707465722f762f737461626c652e737667)](https://packagist.org/packages/fisharebest/flysystem-chroot-adapter)[![Build Status](https://camo.githubusercontent.com/81e9a0eed756a85395e9c49171fa73f6d789f4b0d117d8012232af32ec9c194c/68747470733a2f2f7472617669732d63692e6f72672f66697368617265626573742f666c7973797374656d2d6368726f6f742d616461707465722e7376673f6272616e63683d6d61696e)](https://travis-ci.org/fisharebest/flysystem-chroot-adapter)[![Coverage Status](https://camo.githubusercontent.com/75cc58bbebf6c105af4181185392fd8062273e6b7c9d04b28ca9d9a91a115f97/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f66697368617265626573742f666c7973797374656d2d6368726f6f742d616461707465722f62616467652e7376673f6272616e63683d6d61696e)](https://coveralls.io/github/fisharebest/flysystem-chroot-adapter?branch=main)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/de12ce17fa225f4c80cee457e587723b018eca28e869e4894ac7c8d8d4aefe18/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f66697368617265626573742f666c7973797374656d2d6368726f6f742d616461707465722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d61696e)](https://scrutinizer-ci.com/g/fisharebest/flysystem-chroot-adapter/?branch=main)[![StyleCI](https://camo.githubusercontent.com/02aa7e466d1605b77734011c2f7f29d4fa722f74d09fe9747a3d04876d820022/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3136363233353135322f736869656c643f6272616e63683d6d61696e)](https://github.styleci.io/repos/166235152)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)

This adapter creates a new filesystem from a sub-folder of an existing filesystem.

---

*IMPORTANT: Since flysystem 3.3, this functionality is now available from [flysystem directly](https://flysystem.thephpleague.com/docs/adapter/path-prefixing/).*You should migrate to that package.

In composer.json, replace `fisharebest/flysystem-chroot-adapter` with `league/flysystem-path-prefixing`.

In your code, replace `Fisharebest\Flysystem\Adapter\ChrootAdapter` with `League\Flysystem\PathPrefixing`.

---

Installation
------------

[](#installation)

```
composer require fisharebest/flysystem-chroot-adapter
```

Usage
-----

[](#usage)

```
use League\Flysystem\Filesystem;
use League\Flysystem\Adapter\Local;
use Fisharebest\Flysystem\Adapter\ChrootAdapter

// Write a file to a filesystem.
$filesystem = new Filesystem(new Local(__DIR__));
$filesystem->write('foo/bar/fab/file.txt', 'hello world!');

// Create a chroot filesystem from the foo/bar folder.
$chroot = new Filesystem(new ChrootAdapter($filesystem, 'foo/bar'));

// And read it back from the chroot.
$chroot->read('fab/file.txt'); // 'hello world!'
```

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity64

Established project with proven stability

 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

Every ~375 days

Total

4

Last Release

1550d ago

Major Versions

1.0.1 → 2.0.02020-12-29

2.0.0 → 3.0.02022-02-18

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2306088?v=4)[Greg Roach](/maintainers/fisharebest)[@fisharebest](https://github.com/fisharebest)

---

Top Contributors

[![fisharebest](https://avatars.githubusercontent.com/u/2306088?v=4)](https://github.com/fisharebest "fisharebest (10 commits)")

---

Tags

Flysystemadapterchroot

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/fisharebest-flysystem-chroot-adapter/health.svg)

```
[![Health](https://phpackages.com/badges/fisharebest-flysystem-chroot-adapter/health.svg)](https://phpackages.com/packages/fisharebest-flysystem-chroot-adapter)
```

###  Alternatives

[league/flysystem-aws-s3-v3

AWS S3 filesystem adapter for Flysystem.

1.6k263.6M790](/packages/league-flysystem-aws-s3-v3)[league/flysystem-bundle

Symfony bundle integrating Flysystem into Symfony applications

40129.5M87](/packages/league-flysystem-bundle)[league/flysystem-sftp-v3

SFTP filesystem adapter for Flysystem.

6129.6M91](/packages/league-flysystem-sftp-v3)[league/flysystem-memory

In-memory filesystem adapter for Flysystem.

8533.6M194](/packages/league-flysystem-memory)[league/flysystem-ftp

FTP filesystem adapter for Flysystem.

2820.8M101](/packages/league-flysystem-ftp)[league/flysystem-google-cloud-storage

Google Cloud Storage adapter for Flysystem.

2316.7M45](/packages/league-flysystem-google-cloud-storage)

PHPackages © 2026

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