PHPackages                             stk2k/file-system - 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. stk2k/file-system

ActiveLibrary

stk2k/file-system
=================

A simle file system classes

0.2.3(4y ago)05908MITPHPPHP &gt;=7.2

Since Jun 5Pushed 4y ago1 watchersCompare

[ Source](https://github.com/stk2k/file-system)[ Packagist](https://packagist.org/packages/stk2k/file-system)[ Docs](https://github.com/stk2k/file-system)[ RSS](/packages/stk2k-file-system/feed)WikiDiscussions main Synced 4d ago

READMEChangelogDependencies (3)Versions (8)Used By (8)

A simle file system classes
===========================

[](#a-simle-file-system-classes)

[![Latest Version on Packagist](https://camo.githubusercontent.com/87242169b5dee2cee97dc8c61a7369c18d4cf4f926fb8a3a2ea7ac5e2d053b58/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73746b326b2f66696c652d73797374656d2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/stk2k/file-system)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/967d19618e8bf762a134b66b63d9af19a767c98fe10ed4a03e035b6527b22afb/68747470733a2f2f6170692e7472617669732d63692e636f6d2f73746b326b2f66696c652d73797374656d2e7376673f6272616e63683d6d61696e)](https://api.travis-ci.com/stk2k/file-system.svg?branch=main)[![Coverage Status](https://camo.githubusercontent.com/7e51fab911a4c33e0e104b5be3082aea61c0ef85c4268d851597d42827769d23/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f73746b326b2f66696c652d73797374656d2f62616467652e7376673f6272616e63683d6d61696e)](https://coveralls.io/repos/github/stk2k/file-system/badge.svg?branch=main)[![Code Climate](https://camo.githubusercontent.com/879c1911c5a4dc8e5ba487ea4b922402be054d76de7e75a51f1fbad940b27198/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f73746b326b2f66696c652d73797374656d2f6261646765732f6770612e737667)](https://codeclimate.com/github/stk2k/file-system)[![Total Downloads](https://camo.githubusercontent.com/1a10e4a7c1f12790fe9537974a426dc6ad258c45b8a319b9df1adac3b7cd9ec8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73746b326b2f66696c652d73797374656d2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/stk2k/file-system)

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

[](#description)

A simle file system classes

Feature
-------

[](#feature)

- Simple file class(File)
- File function facade class(FileFacade)

Usage
-----

[](#usage)

### making a file

[](#making-a-file)

```
use stk2k\filesystem\FileSystem;

FileSystem::put('/path/to/file', 'Hello, World');
```

### deleting a file

[](#deleting-a-file)

```
use stk2k\filesystem\FileSystem;

FileSystem::delete('/path/to/file');
```

### getting file's content

[](#getting-files-content)

```
use stk2k\filesystem\FileSystem;

// getting whole content as string
$ret = FileSystem::get('/path/to/file');
echo $ret;

// getting whole content as array
$ret = FileSystem::getAsArray('/path/to/file');
print_r($ret);
```

### putting file's content

[](#putting-files-content)

```
use stk2k\filesystem\File;
use stk2k\filesystem\FileSystem;

// putting string content
$ret = FileSystem::put('/path/to/file', 'Hello, World!');
echo $ret->get();       // Hello, World!

// putting array(of strings) content
$ret = FileSystem::put('/path/to/file', ['Foo', 'Bar']);
echo $ret->get();
// Foo
// Bar

// putting File object
file_put_contents('/path/to/file1', 'Hello, World!');
$ret = FileSystem::put('/path/to/file2', new File('/path/to/file1'));
echo $ret->get();       // Hello, World!

// putting object content(Stringable)
class MyStringableObject
{
    public function __toString() : string
    {
        return 'Hello, World!';
    }
}
$ret = FileSystem::put('/path/to/file', new MyStringableObject());
echo $ret->get();       // Hello, World!
```

### file object

[](#file-object)

```
use stk2k\filesystem\File;

$ret = new File('/path/to/file');
echo $ret->get();
```

Requirement
-----------

[](#requirement)

PHP 7.2 or later

Installing stk2k/file-system
----------------------------

[](#installing-stk2kfile-system)

The recommended way to install stk2k/file-system is through [Composer](http://getcomposer.org).

```
composer require stk2k/file-system
```

After installing, you need to require Composer's autoloader:

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

License
-------

[](#license)

This library is licensed under the MIT license.

Author
------

[](#author)

[stk2k](https://github.com/stk2k)

Disclaimer
----------

[](#disclaimer)

This software is no warranty.

We are not responsible for any results caused by the use of this software.

Please use the responsibility of the your self.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community15

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.

###  Release Activity

Cadence

Every ~4 days

Total

7

Last Release

1777d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/955f3d564811dc5e1212c1a7a66bc4eb7e11ac166cc38600f244dc25f97d3ef4?d=identicon)[stk2k](/maintainers/stk2k)

---

Top Contributors

[![stk2k](https://avatars.githubusercontent.com/u/985640?v=4)](https://github.com/stk2k "stk2k (13 commits)")

---

Tags

phpFieSystem

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/stk2k-file-system/health.svg)

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

###  Alternatives

[pestphp/pest-plugin-stressless

Stressless plugin for Pest

67792.6k16](/packages/pestphp-pest-plugin-stressless)

PHPackages © 2026

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