PHP的文件系统工具包

0.4.5 2017-11-04 15:37 UTC

README

Latest Version Software License Build Status Coverage Status Total Downloads

PHP的文件系统工具包。

为什么?

sndsgd\fs中的类试图简化繁琐的文件系统任务。

use \sndsgd\Fs;

# lets assume `/tmp/some` doesn't exist
$path = "/tmp/some/deep/path/file.txt";

# write to a file that doesn't exist in a directory that doesn't exist
$file = Fs::getFile($path);
if ($file->write("the contents...") === false) {
   throw new Exception($file->getError());
}

要求

该项目是不稳定的,版本之间可能会有变化。如果您打算依赖此项目,请务必在项目中的composer.json文件中注明并指定版本。这样做将确保任何破坏性的更改不会破坏您的项目。

使用此库需要PHP >= 7.0.0

安装

使用Composer安装sndsgd/fs

composer require sndsgd/fs