PHPackages                             michaeldrennen/local-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. michaeldrennen/local-file

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

michaeldrennen/local-file
=========================

A small php library that adds some functions to operate on local files, like an efficient line count function.

v2.0.2(5y ago)322.0k↓50%45MITPHPPHP ^7.3||^8.0

Since Mar 21Pushed 5y ago1 watchersCompare

[ Source](https://github.com/michaeldrennen/LocalFile)[ Packagist](https://packagist.org/packages/michaeldrennen/local-file)[ RSS](/packages/michaeldrennen-local-file/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (3)Versions (12)Used By (5)

LocalFile v2.x
==============

[](#localfile-v2x)

[![Latest Stable Version](https://camo.githubusercontent.com/c45415beeda32054f6542b2aece8f5819ed197a179e5be8d77459c3452c83919/68747470733a2f2f706f7365722e707567782e6f72672f6d69636861656c6472656e6e656e2f6c6f63616c2d66696c652f76657273696f6e)](https://packagist.org/packages/michaeldrennen/local-file) [![Total Downloads](https://camo.githubusercontent.com/297d3fd1e30bf347aa4aca67d365be7165698eb8136f8774d50e2a6786369f59/68747470733a2f2f706f7365722e707567782e6f72672f6d69636861656c6472656e6e656e2f6c6f63616c2d66696c652f646f776e6c6f616473)](https://packagist.org/packages/michaeldrennen/local-file) [![License](https://camo.githubusercontent.com/e80cc419596a62b1a84acb7692f9b86e468c050eb5250357bf950e95ced0d8f6/68747470733a2f2f706f7365722e707567782e6f72672f6d69636861656c6472656e6e656e2f6c6f63616c2d66696c652f6c6963656e7365)](https://packagist.org/packages/michaeldrennen/local-file) [![Build Status](https://camo.githubusercontent.com/4bf132b1e3c71cd8e7b4f6ba325e80b6b210fb73732a9565efbae65689a5e6ca/68747470733a2f2f7472617669732d63692e6f72672f6d69636861656c6472656e6e656e2f4c6f63616c46696c652e7376673f6272616e63683d76312e302e32)](https://travis-ci.org/michaeldrennen/LocalFile) [![Coverage Status](https://camo.githubusercontent.com/dd5c6584ab53bf6bfa9a73ad567002b03669b262ace126be0ebfc653c3173fd8/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f6d69636861656c6472656e6e656e2f4c6f63616c46696c652f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/michaeldrennen/LocalFile?branch=master)

A small php library that handles some common functions needed for local files.

And then run `composer install` from the terminal.

### Quick Installation

[](#quick-installation)

Use the following command in your terminal:

```
composer require "michaeldrennen/local-file"

```

### Usage

[](#usage)

#### Get the number of lines in a file as an integer

[](#get-the-number-of-lines-in-a-file-as-an-integer)

```
use MichaelDrennen\LocalFile\LocalFile;

$lineCount = LocalFile::lineCount('/path/to/your/file.txt);
echo $lineCount;
```

#### Split a text file into chunks. Each chunk has 1000 lines.

[](#split-a-text-file-into-chunks-each-chunk-has-1000-lines)

```
use MichaelDrennen\LocalFile\LocalFile;

$splitFilePaths = LocalFile::split('/path/to/your/file.txt);
print_r($splitFilePaths);
```

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity75

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

Recently: every ~286 days

Total

11

Last Release

1874d ago

Major Versions

v1.x-dev → v2.0.02019-03-22

PHP version history (3 changes)v1.0.1PHP ^7.1

v2.0.0PHP ^7.3

v2.0.1PHP ^7.3||^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/b701baeed9e105a4a117e363b478d932306516c9365b4f2e3ef2dfed358f608b?d=identicon)[michaeldrennen](/maintainers/michaeldrennen)

---

Top Contributors

[![michaeldrennen](https://avatars.githubusercontent.com/u/5288190?v=4)](https://github.com/michaeldrennen "michaeldrennen (25 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/michaeldrennen-local-file/health.svg)

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

###  Alternatives

[knplabs/gaufrette

PHP library that provides a filesystem abstraction layer

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

Cloud Storage Client for PHP

34390.8M125](/packages/google-cloud-storage)[illuminate/filesystem

The Illuminate Filesystem package.

15261.6M2.6k](/packages/illuminate-filesystem)[superbalist/flysystem-google-storage

Flysystem adapter for Google Cloud Storage

26320.6M30](/packages/superbalist-flysystem-google-storage)[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)

PHPackages © 2026

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