PHPackages                             fostam/filelock - 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. fostam/filelock

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

fostam/filelock
===============

Simple file based locking with lock timeout and exceptions

v1.0.2(5y ago)126.9k↓32.1%MITPHPPHP &gt;=5.6CI failing

Since Feb 15Pushed 5y agoCompare

[ Source](https://github.com/fostam/php-filelock)[ Packagist](https://packagist.org/packages/fostam/filelock)[ RSS](/packages/fostam-filelock/feed)WikiDiscussions master Synced 1mo ago

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

fostam/filelock
===============

[](#fostamfilelock)

Simple file based locking.

Features
--------

[](#features)

- file based locking with flock()
- works on Unix-like systems as well as Windows
- supports timeout for acquiring lock
- no third-party dependencies

Install
-------

[](#install)

The easiest way to install FileLock is by using [composer](https://getcomposer.org/):

```
$> composer require fostam/filelock

```

Usage
-----

[](#usage)

```
