PHPackages                             clavelinho/shred - 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. clavelinho/shred

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

clavelinho/shred
================

Safely deletes files

043.2k↓19.4%PHP

Since Dec 20Pushed 9y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

Shred PHP
=========

[](#shred-php)

Safely deletes files v0.5b

Requeriments
------------

[](#requeriments)

PHP 5.3

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

[](#installation)

composer.json

```
{
	"require": {
		"clavelinho/shred": "dev-master"
	}
}
```

Run `composer install`

Usage
-----

[](#usage)

```
// load autoload composer
require 'vendor/autoload.php';

$shred = new Shred\Shred($n); // $n (optional) remove('folder/file.txt'); // remove('folder/file.txt', false); // remove('folder/file.txt')) {
	// The file is truncated & removed.
} else {
	// Impossible to overwrite or remove the file. See filepath & file permissions.
}
```

Shred overwrite 'n' times the file for make more difficult to recovery (Imposible is nothing!). Obviously inspired in shred for linux. If you want to delete large files, or repeat a large number of times the interaction should increase the execution time of the script.

```
ini_get('max_execution_time'); // Max execution script time in seconds.
set_time_limit($s); // $s => Set max time limit in seconds.
```

Credits
-------

[](#credits)

Shred PHP was created by Dani C. Released under the MIT license.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community7

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/1163d5504c44b173b0561d231e8798f53f034e7a579dc09d9befedbf29770782?d=identicon)[Clavelinho](/maintainers/Clavelinho)

---

Top Contributors

[![Clavelinho](https://avatars.githubusercontent.com/u/6264667?v=4)](https://github.com/Clavelinho "Clavelinho (9 commits)")

### Embed Badge

![Health badge](/badges/clavelinho-shred/health.svg)

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

###  Alternatives

[knplabs/gaufrette

PHP library that provides a filesystem abstraction layer

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

Flysystem adapter for Google Cloud Storage

26320.6M30](/packages/superbalist-flysystem-google-storage)[illuminate/filesystem

The Illuminate Filesystem package.

15161.6M2.6k](/packages/illuminate-filesystem)[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)[madnest/madzipper

Easier zip file handling for Laravel applications.

1382.3M6](/packages/madnest-madzipper)

PHPackages © 2026

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