Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on May 21, 2024 via composer

webimpress/safe-writer 2.2.0

Tool to write files safely, to avoid race conditions
Package summary
Share
0
issues
1
license
1
BSD-2-Clause
Package created
15 Nov 2019
Version published
19 Apr 2021
Maintainers
1
Total deps
1
Direct deps
0
License
BSD-2-Clause

Issues

0
This package has no issues

Licenses

BSD 2-Clause "Simplified" License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
place-warranty
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
webimpress/safe-writer@2.2.0
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of webimpress/safe-writer 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does webimpress/safe-writer do?

Webimpress Safe Writer is a useful tool designed to write files safely, with the main goal of avoiding race conditions that may occur when the same file undergoes multiple writes in a short time period. By managing potential concurrency issues, it significantly improves the reliability of file writing operations in multi-threaded scenarios.

How do you use webimpress/safe-writer?

To utilize the features of Webimpress Safe Writer, you should first install the package using composer. This can be done by running the command $ composer require webimpress/safe-writer in your terminal. Afterwards, you can import it in your PHP file and use its FileWriter function. For example, you could utilize it as follows:

use Webimpress\SafeWriter\FileWriter;

$targetFile = __DIR__ . '/target-file.php';
$content = "<?php\nreturn " . var_export($data, true) . ';';

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

In this example, FileWriter::writeFile is used to write your $content to the $targetFile. If an issue occurs during the write process, an exception (instance of Webimpress\SafeWriter\Exception\ExceptionInterface) will be thrown.

Where are the webimpress/safe-writer docs?

For documentation of Webimpress Safe Writer, you can refer to the README file in the GitHub repository. This document provides essential information on how to install and use the package in your PHP applications. For the most up-to-date and comprehensive details about this package, visit the official GitHub page at https://github.com/webimpress/safe-writer.git.