Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/corals/old/vendor/webimpress/safe-writer/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/old/vendor/webimpress/safe-writer/README.md
# 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 = "<?php\nreturn " . var_export($data, true) . ';';

FileWriter::writeFile($targetFile, $content);
```

If something goes wrong exception (instance of `Webimpress\SafeWriter\Exception\ExceptionInterface`)
will be thrown.

Spamworldpro Mini