定制 webimpress/safe-writer 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

webimpress/safe-writer

最新稳定版本:2.2.0

Composer 安装命令:

composer require webimpress/safe-writer

包简介

Tool to write files safely, to avoid race conditions

README 文档

README

Unit Tests Coding Standards Static Analysis Coverage Status

Write files safely to avoid race conditions when the same file is written multiple times in a short time period.

Installation

Using composer:

composer require webimpress/safe-writer

Usage

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.

统计信息

  • 总下载量: 38.16M
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 381
  • 点击次数: 1
  • 依赖项目数: 28
  • 推荐数: 0

GitHub 信息

  • Stars: 378
  • Watchers: 5
  • Forks: 9
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-2-Clause
  • 更新时间: 2026-01-04