PHPackages                             darling/php-file-system-paths - 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. darling/php-file-system-paths

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

darling/php-file-system-paths
=============================

Defines classes for working with a file system in php.

v1.0.0(2y ago)1573[2 issues](https://github.com/sevidmusic/PHPFileSystemPaths/issues)2MITPHPPHP ^8.1

Since Dec 7Pushed 2y ago1 watchersCompare

[ Source](https://github.com/sevidmusic/PHPFileSystemPaths)[ Packagist](https://packagist.org/packages/darling/php-file-system-paths)[ RSS](/packages/darling-php-file-system-paths/feed)WikiDiscussions main Synced yesterday

READMEChangelog (1)Dependencies (5)Versions (3)Used By (2)

PHPFileSystemPaths
==================

[](#phpfilesystempaths)

The PHPFileSystemPaths defines classes for working with file system paths in php.

\\Darling\\PHPFileSystemPaths\\classes\\paths\\PathToExistingDirectory
======================================================================

[](#darlingphpfilesystempathsclassespathspathtoexistingdirectory)

A `PathToExisitingDirectory` can be used when a path to an existing directory is required.

The `__toString()` method can be used to obtain the path to the directory.

If the assigned `SafeTextCollection` can be mapped to an existing directory it will be used to construct the path returned by the `__toString()` method.

However, if the assigned `SafeTextCollection` cannot be mapped to an existing directory then the `__toString()` method will return the path returned by `php`'s `sys_get_temp_dir()` function.

### Methods:

[](#methods)

```
    /**
     * Return the SafeTextCollection that defines the parts of this
     * PathToExistingDirectory.
     *
     * @return SafeTextCollection
     *
     */
    public function safeTextCollection(): SafeTextCollection;

    /**
     * Return the path to the existing directory.
     *
     * @return string
     *
     */
    public function __toString(): string;

```

\\Darling\\PHPFileSystemPaths\\classes\\paths\\PathToExistingFile
=================================================================

[](#darlingphpfilesystempathsclassespathspathtoexistingfile)

A `PathToExistingFile` can be used when a path to an existing file is required.

The `__toString()` method can be used to obtain the path to the file.

If the assigned `PathToExistingDirectory` and `Name` can be mapped to an existing file they will be used to construct the path returned by the `__toString()` method.

However, if the assigned `PathToExistingDirectory` and `Name` cannot be mapped to an existing file then the `__toString()` method will return the path to a temporary file in the directory whose path matches the path returned by `php`'s `sys_get_temp_dir()` function.

The temporary file name will always be : `PHPFileSystemPathsEmptyTmpFile`

The temporary file will be created if necessary.

### Methods:

[](#methods-1)

```
    /**
     * Return the PathToExisitingDirectory that defines the path where
     * the file is expected to be located.
     *
     * @return PathToExistingDirectory
     *
     */
    public function pathToExistingDirectory(): PathToExistingDirectory;

    /**
     * Return the Name of the file.
     *
     * @return Name
     *
     */
    public function name(): Name;

    /**
     * Return the path to the file.
     *
     * @return string
     *
     */
    public function __toString(): string;

```

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity52

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

Unknown

Total

1

Last Release

939d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/10404993?v=4)[Sevi D](/maintainers/sevidmusic)[@sevidmusic](https://github.com/sevidmusic)

---

Top Contributors

[![sevidmusic](https://avatars.githubusercontent.com/u/10404993?v=4)](https://github.com/sevidmusic "sevidmusic (41 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/darling-php-file-system-paths/health.svg)

```
[![Health](https://phpackages.com/badges/darling-php-file-system-paths/health.svg)](https://phpackages.com/packages/darling-php-file-system-paths)
```

###  Alternatives

[ericnorris/amazon-s3-php

A lightweight and fast S3 client for PHP.

2147.0k](/packages/ericnorris-amazon-s3-php)

PHPackages © 2026

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