PHPackages                             sikofitt/retrorsum - 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. sikofitt/retrorsum

Abandoned → [konsulting/project-root](/?search=konsulting%2Fproject-root)Library[File &amp; Storage](/categories/file-storage)

sikofitt/retrorsum
==================

Finds a file searching recursively from the current directory.

v1.0.0(9y ago)223GPL-3.0PHPPHP &gt;=5.6

Since Feb 3Pushed 9y ago1 watchersCompare

[ Source](https://github.com/sikofitt/retrorsum)[ Packagist](https://packagist.org/packages/sikofitt/retrorsum)[ Docs](https://github.com/sikofitt/retrorsum)[ RSS](/packages/sikofitt-retrorsum/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (2)Versions (3)Used By (0)

Retrorsum
=========

[](#retrorsum)

This is a simple thing that will search for a file traversing down from the current directory.

This came about because I was thinking of how I could find the base directory of a project without guessing with `__DIR__."/../../../"` and without forcing an app/ directory or something.

I wanted to find a way to find the base directory of an app from a class.

At the moment it does not work if the path is a symlink.

Usage
-----

[](#usage)

```
use Sikofitt\Retrorsum\Finder;

$finder = new Finder('autoload.php');

define('BASE_DIR', dirname((string)$finder));
```

or

```
define('BASE_DIR', dirname((string)(new Finder('autoload.php'))));
```

Although this could set BASE\_DIR as an empty string if it found nothing.

```
$finder = new Finder('autoload.php');
if(true === $finder->isFound())
{
    define('BASE_DIR', dirname($finder->getPath()));
} else {
   // Whatever your other method would be.
}
```

License
-------

[](#license)

GPL-3.0

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

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.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

3385d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ca20b56d1cdac9dab6ef37ad857e2b924216ac7cbc8c5233846437a303ac837a?d=identicon)[sikofitt](/maintainers/sikofitt)

---

Top Contributors

[![sikofitt](https://avatars.githubusercontent.com/u/3673285?v=4)](https://github.com/sikofitt "sikofitt (5 commits)")

---

Tags

filefilesystemphpphp56php7searchfilefindreverse

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/sikofitt-retrorsum/health.svg)

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

###  Alternatives

[league/flysystem

File storage abstraction for PHP

13.6k639.1M2.2k](/packages/league-flysystem)[league/flysystem-aws-s3-v3

AWS S3 filesystem adapter for Flysystem.

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

PHP library that provides a filesystem abstraction layer

2.5k39.8M123](/packages/knplabs-gaufrette)[knplabs/knp-gaufrette-bundle

Allows to easily use the Gaufrette library in a Symfony project

72528.6M91](/packages/knplabs-knp-gaufrette-bundle)[league/flysystem-local

Local filesystem adapter for Flysystem.

226231.8M39](/packages/league-flysystem-local)[league/flysystem-memory

In-memory filesystem adapter for Flysystem.

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

PHPackages © 2026

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