Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/webimpress/safe-writer
Write files safely, to avoid race conditions
https://github.com/webimpress/safe-writer
concurrent-write file-writer php race-condition-prevention safe-writer
Last synced: 3 months ago
JSON representation
Write files safely, to avoid race conditions
- Host: GitHub
- URL: https://github.com/webimpress/safe-writer
- Owner: webimpress
- License: bsd-2-clause
- Created: 2019-10-28T09:57:58.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-07-19T08:36:08.000Z (7 months ago)
- Last Synced: 2024-07-20T03:22:43.016Z (7 months ago)
- Topics: concurrent-write, file-writer, php, race-condition-prevention, safe-writer
- Language: PHP
- Size: 313 KB
- Stars: 376
- Watchers: 8
- Forks: 9
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Webimpress Safe Writer
[![Unit Tests](https://github.com/webimpress/safe-writer/actions/workflows/phpunit.yml/badge.svg)](https://github.com/webimpress/safe-writer/actions/workflows/phpunit.yml)
[![Coding Standards](https://github.com/webimpress/safe-writer/actions/workflows/phpcs.yml/badge.svg)](https://github.com/webimpress/safe-writer/actions/workflows/phpcs.yml)
[![Static Analysis](https://github.com/webimpress/safe-writer/actions/workflows/static-analysis.yml/badge.svg)](https://github.com/webimpress/safe-writer/actions/workflows/static-analysis.yml)
[![Coverage Status](https://coveralls.io/repos/github/webimpress/safe-writer/badge.svg?branch=master)](https://coveralls.io/github/webimpress/safe-writer?branch=master)Write files safely to avoid race conditions when
the same file is written multiple times in a short time period.## Installation
Using composer:
```console
composer require webimpress/safe-writer
```## Usage
```php
use Webimpress\SafeWriter\FileWriter;$targetFile = __DIR__ . '/target-file.php';
$content = "