PHPackages                             tigron/skeleton-file - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. tigron/skeleton-file

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

tigron/skeleton-file
====================

Tigron File utilities

v2.0.8(8mo ago)018.7k↓47%3[1 issues](https://github.com/tigron/skeleton-file/issues)[1 PRs](https://github.com/tigron/skeleton-file/pulls)5MITPHPPHP &gt;=7.0.0

Since Aug 14Pushed 2mo ago4 watchersCompare

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

READMEChangelog (10)Dependencies (3)Versions (42)Used By (5)

skeleton-file
=============

[](#skeleton-file)

Description
-----------

[](#description)

This library makes it easy to handle user uploaded files or files created by your application. Files will be stored on disk, meta data in database. This library automatically stores files in a structured way on disk with unique filenames.

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

[](#installation)

Installation via composer:

```
composer require tigron/skeleton-file

```

Create a new table in your database:

```
CREATE TABLE `file` (
    `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
    `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `path` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `md5sum` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
    `mime_type` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
    `size` bigint(20) NOT NULL,
    `expiration_date` datetime DEFAULT NULL,
    `created` datetime NOT NULL,
    PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

```

Howto
-----

[](#howto)

Initialize the file store:

```
\Skeleton\File\Config::$file_path = $some_very_cool_path;

/**
 * \Skeleton\File\Config::$store_dir is deprecated
 * $store_dir added directory 'file' to the defined path
 *
 * \Skeleton\File\Config::$file_dir is deprecated
 *
 * Please use $file_path instead
 */

```

Upload a file:

```
$file = \Skeleton\File\File::upload($_FILES['upload']);

```

Create a new file:

```
$file = \Skeleton\File\File::store('filename.txt', 'this is the content');

```

Copy a file:

```
$file2 = $file->copy();

```

Delete a file:

```
$file->delete();

```

Get the content of the file:

```
$contents = $file->get_contents();

```

Get the path of the file on disk:

```
$path = $file->get_path();

```

Send the file to the browser (download):

```
$file->client_download();

```

Get a file by his ID

```
$file = File::get_by_id(1);

```

###  Health Score

51

—

FairBetter than 95% of packages

Maintenance74

Regular maintenance activity

Popularity27

Limited adoption so far

Community25

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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

Recently: every ~317 days

Total

41

Last Release

267d ago

Major Versions

v0.4.2 → v1.0.02020-10-19

v1.0.12 → v2.0.02022-01-25

### Community

Maintainers

![](https://www.gravatar.com/avatar/8bff1383483dacb0c3f89d2d3856ae03d4cf3e80de26a2998248dd1175317285?d=identicon)[tigron](/maintainers/tigron)

---

Top Contributors

[![christopheg](https://avatars.githubusercontent.com/u/199087?v=4)](https://github.com/christopheg "christopheg (27 commits)")[![LionelLaffineur](https://avatars.githubusercontent.com/u/21120913?v=4)](https://github.com/LionelLaffineur "LionelLaffineur (19 commits)")[![gerryd](https://avatars.githubusercontent.com/u/3003371?v=4)](https://github.com/gerryd "gerryd (7 commits)")[![SanderTigron](https://avatars.githubusercontent.com/u/45229883?v=4)](https://github.com/SanderTigron "SanderTigron (4 commits)")[![davidvandemaele](https://avatars.githubusercontent.com/u/1914033?v=4)](https://github.com/davidvandemaele "davidvandemaele (4 commits)")[![RoanB](https://avatars.githubusercontent.com/u/77972728?v=4)](https://github.com/RoanB "RoanB (3 commits)")[![jochentimmermans-tigron](https://avatars.githubusercontent.com/u/61510659?v=4)](https://github.com/jochentimmermans-tigron "jochentimmermans-tigron (1 commits)")

### Embed Badge

![Health badge](/badges/tigron-skeleton-file/health.svg)

```
[![Health](https://phpackages.com/badges/tigron-skeleton-file/health.svg)](https://phpackages.com/packages/tigron-skeleton-file)
```

PHPackages © 2026

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