PHPackages                             sun/filesystem - 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. sun/filesystem

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

sun/filesystem
==============

This package helps you to manage your file easily.

v1.3(10y ago)058MITPHPPHP &gt;=5.4.0

Since Jul 13Pushed 10y ago1 watchersCompare

[ Source](https://github.com/IftekherSunny/Filesystem)[ Packagist](https://packagist.org/packages/sun/filesystem)[ RSS](/packages/sun-filesystem/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (2)Versions (4)Used By (0)

Filesystem
----------

[](#filesystem)

[![Build Status](https://camo.githubusercontent.com/b52ded8cf2334a082ffa86aaf499ae300cc696a3ba9f3246fc66f289127cb2c9/68747470733a2f2f7472617669732d63692e6f72672f496674656b68657253756e6e792f46696c6573797374656d2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/IftekherSunny/Filesystem)[![Total Downloads](https://camo.githubusercontent.com/c5fd7333f864c4bf448379cc057135fd0d0d6cb34ffb81ba91cc79ebfb215283/68747470733a2f2f706f7365722e707567782e6f72672f73756e2f66696c6573797374656d2f646f776e6c6f616473)](https://packagist.org/packages/sun/filesystem)[![Latest Stable Version](https://camo.githubusercontent.com/7928b113693f4052bde7810cfd36cc24b79f71af271c3c8d51a980a99bc91dc9/68747470733a2f2f706f7365722e707567782e6f72672f73756e2f66696c6573797374656d2f762f737461626c65)](https://packagist.org/packages/sun/filesystem) [![Latest Unstable Version](https://camo.githubusercontent.com/534ff622c971e7e88031591564ae2ab47495bcfcca9b77732ba982841c61e5ca/68747470733a2f2f706f7365722e707567782e6f72672f73756e2f66696c6573797374656d2f762f756e737461626c65)](https://packagist.org/packages/sun/filesystem) [![License](https://camo.githubusercontent.com/0ad39139a0ce6ecc9d727ffbef7badb8b19e5dd044a659c3d5c78aea493ae1ae/68747470733a2f2f706f7365722e707567782e6f72672f73756e2f66696c6573797374656d2f6c6963656e7365)](https://packagist.org/packages/sun/filesystem)

Filesystem helps you to manage your file easily.

Installation Process
--------------------

[](#installation-process)

Just copy Filesystem folder somewhere into your project directory. Then include filesystem autoloader.

```
 require_once('/path/to/Filesystem/autoload.php');
```

Filesystem is also available via Composer/Packagist.

```
 composer require sun/filesystem

```

All Methods
-----------

[](#all-methods)

###### To create file

[](#to-create-file)

```
$filesystem = new Sun\Filesystem;
$filesystem->create(__DIR__.'/filename.txt', 'content');
```

###### To delete file

[](#to-delete-file)

```
$filesystem->delete(__DIR__.'/filename.txt');
```

###### To update file

[](#to-update-file)

```
$filesystem->update(__DIR__.'/filename.txt', ' more content');
```

###### To get file content

[](#to-get-file-content)

```
$filesystem->get(__DIR__.'/filename.txt');
```

###### To append file content

[](#to-append-file-content)

```
$filesystem->append(__DIR__.'/filename.txt', 'more content');
```

###### To copy a file

[](#to-copy-a-file)

```
$filesystem->copy(__DIR__.'/filename.txt', __DIR__.'/filename2.txt' );
```

###### To move a file

[](#to-move-a-file)

```
$filesystem->move(__DIR__.'/filename.txt', __DIR__.'/destination/filename.txt' );
```

###### To get filesize

[](#to-get-filesize)

```
$filesystem->size(__DIR__.'/filename.txt');
```

###### To check file exists

[](#to-check-file-exists)

```
$filesystem->exists(__DIR__.'/filename.txt');
```

###### To get all files in a directory

[](#to-get-all-files-in-a-directory)

```
$filesystem->files(__DIR__.'/directoryName');
```

###### To get all directories in a directory

[](#to-get-all-directories-in-a-directory)

```
$filesystem->directories(__DIR__.'/directoryName');
```

###### To create a directory

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

```
$filesystem->createDirectory(__DIR__.'/directoryName');
```

###### To delete a directory

[](#to-delete-a-directory)

```
$filesystem->deleteDirectory(__DIR__.'/directoryName');
```

###### To clean a directory

[](#to-clean-a-directory)

```
$filesystem->cleanDirectory(__DIR__.'/directoryName');
```

License
-------

[](#license)

This package is licensed under the [MIT License](https://github.com/IftekherSunny/filesystem/blob/master/LICENSE)

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity60

Established project with proven stability

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

Total

4

Last Release

3941d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7d233b865d7b1e1b86271e3bc70ddd077e1c01e4a83124e020fa39199c4af15a?d=identicon)[IftekherSunny](/maintainers/IftekherSunny)

---

Top Contributors

[![IftekherSunny](https://avatars.githubusercontent.com/u/8013399?v=4)](https://github.com/IftekherSunny "IftekherSunny (10 commits)")

---

Tags

filesystemphp filesystemfast filesystemfile create

### Embed Badge

![Health badge](/badges/sun-filesystem/health.svg)

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

###  Alternatives

[league/flysystem

File storage abstraction for PHP

13.6k639.1M2.2k](/packages/league-flysystem)[league/flysystem-aws-s3-v3

AWS S3 filesystem adapter for Flysystem.

1.6k263.6M790](/packages/league-flysystem-aws-s3-v3)[knplabs/gaufrette

PHP library that provides a filesystem abstraction layer

2.5k39.8M123](/packages/knplabs-gaufrette)[knplabs/knp-gaufrette-bundle

Allows to easily use the Gaufrette library in a Symfony project

72428.6M91](/packages/knplabs-knp-gaufrette-bundle)[league/flysystem-local

Local filesystem adapter for Flysystem.

225231.8M39](/packages/league-flysystem-local)[oneup/flysystem-bundle

Integrates Flysystem filesystem abstraction library to your Symfony project.

64422.9M66](/packages/oneup-flysystem-bundle)

PHPackages © 2026

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