PHPackages                             grinderspro/directory-manipulator - 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. grinderspro/directory-manipulator

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

grinderspro/directory-manipulator
=================================

Simple folder manipulation. Create, delete, rename folder

1.0.31(7y ago)44771MITPHPPHP &gt;=5.4.0

Since Mar 11Pushed 7y ago1 watchersCompare

[ Source](https://github.com/grinderspro/directory-manipulator)[ Packagist](https://packagist.org/packages/grinderspro/directory-manipulator)[ RSS](/packages/grinderspro-directory-manipulator/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (5)DependenciesVersions (7)Used By (0)

Simple work with directories
============================

[](#simple-work-with-directories)

This package allows you to simply work with directories. Create, delete, rename and empty directories.

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

[](#installation)

You can install the package via composer:

`composer require grinderspro/directory-manipulator`

Usage
-----

[](#usage)

### Simple create a directory

[](#simple-create-a-directory)

To create a directory, use the `create()` method. If you use the `create()` method without parameters, then the directory will be created in the temporary system folder by default.

```
require __DIR__ . '/vendor/autoload.php';

use Grinderspro\DirectoryManipulator\DirectoryManipulator;

(new DirectoryManipulator())->create();
```

Create many directories

```
$dm = (new DirectoryManipulator())->location('/var/tmp/')->clear();

for ($i=1; $iname('gm'.$i)->create();
}
```

Create directory - "/var/tmp/{time()}"

```
(new DirectoryManipulator())->location('/var/tmp/')->name()->create();
```

Create directory - "/var/tmp/grinderspro"

```
(new DirectoryManipulator())->location('/var/tmp/')->name('grinderspro')->create();
```

```
(new DirectoryManipulator())->location('/var/tmp/grinderspro')->create();
```

```
if((new DirectoryManipulator())->location('/var/tmp/grinderspro')->create())
    return true;
```

To get the full path of the newly created directory, use the `path()` method without parameters.

```
$dirName = (new DirectoryManipulator())->create('/var/tmp/')->name()->path();
```

### Delete directories

[](#delete-directories)

```
(new DirectoryManipulator())->location('/var/tmp/')->name('grinderspro')->delete();
```

```
(new DirectoryManipulator())->location('/var/tmp/grinderspro')->delete();
```

### Clear directory

[](#clear-directory)

```
(new DirectoryManipulator())->location('/var/tmp/grinderspro')->clear();
```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity62

Established project with proven stability

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 ~24 days

Total

5

Last Release

2888d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/477f103e4d93beb1a0f6ff0658d64e35614feec4186c040faf0ad40f829570c8?d=identicon)[grinderspro](/maintainers/grinderspro)

---

Tags

create-directoryphpgrindersprodirectory manipulatorfolder manipulationcreate folderdelete folderrename folderempty folderсоздание директорииудаление директорииочистить директорию

### Embed Badge

![Health badge](/badges/grinderspro-directory-manipulator/health.svg)

```
[![Health](https://phpackages.com/badges/grinderspro-directory-manipulator/health.svg)](https://phpackages.com/packages/grinderspro-directory-manipulator)
```

###  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)
