PHPackages                             hrupin/yii2-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. [File &amp; Storage](/categories/file-storage)
4. /
5. hrupin/yii2-file

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

hrupin/yii2-file
================

File

0.1.2(10y ago)036MITPHP

Since Jan 9Pushed 10y ago1 watchersCompare

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

READMEChangelog (3)Dependencies (1)Versions (4)Used By (0)

File
====

[](#file)

File

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

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist hrupin/yii2-file "*"

```

or add

```
"hrupin/yii2-file": "*"

```

to the require section of your `composer.json` file.

Usage
-----

[](#usage)

Once the extension is installed, simply use it in your code by :

```
use hrupin\file\File;

$dir = '/some/your/dir';

$file = new File($dir, 'file.txt');
$file->readAllFile();
$file->readStrFile(10);
$file->closeFile();

$file->createFile($dir, 'anotherFile.txt');
$file->writeFile('You some text or data ...');
$file->writeFile('Add you some text or data ...');
$file->readAllFile();
$file->closeFile();

var_dump($file->getErrors());

```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

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

Total

3

Last Release

3776d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9069a337e0ac7cc17f0776fb72d1d106869a482bb266ca35a37ec1ff5cfa682f?d=identicon)[hrupin](/maintainers/hrupin)

---

Tags

yii2extension

### Embed Badge

![Health badge](/badges/hrupin-yii2-file/health.svg)

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

###  Alternatives

[fedemotta/yii2-aws-sdk

This extension provides the AWS SDK integration for the Yii2 framework

15430.4k2](/packages/fedemotta-yii2-aws-sdk)[liyunfang/yii2-upload-behavior

Upload behavior for Yii 2

161.7k](/packages/liyunfang-yii2-upload-behavior)

PHPackages © 2026

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