druc/flysystem-incremental-naming
Composer 安装命令:
composer require druc/flysystem-incremental-naming
包简介
Flysystem plugins to increment file names when dealing with duplicates
README 文档
README
Flysystem plugins to increment file names when dealing with duplicates
Install
Via Composer
$ composer require druc/flysystem-incremental-naming
Usage
<?php use Druc\Flysystem\IncrementalNaming\IncrementedCopy; use Druc\Flysystem\IncrementalNaming\IncrementedRename; use Druc\Flysystem\IncrementalNaming\IncrementedPath; use League\Flysystem\Adapter\Local; use League\Flysystem\Filesystem; include __DIR__ . '/vendor/autoload.php'; $adapter = new Local(__DIR__ . '/my-dir'); $this->filesystem = new Filesystem($adapter); $this->filesystem->addPlugin(new IncrementedCopy); $this->filesystem->addPlugin(new IncrementedRename); $this->filesystem->addPlugin(new IncrementedPath); $filesystem = new Filesystem($adapter); // Filenames will be incremented when copying/renaming into a directory containing the same filename $filesystem->incrementedCopy('mydir/file', 'other-dir/file'); // 'other-dir/file_1' $filesystem->incrementedRename('mydir/file', 'other-dir/file'); // 'other-dir/file_1' // This returns 'other-dir/file_2' if 'file' and 'file_1' are already present $filesystem->getIncrementedPath('other-dir/file');
Change log
Please see CHANGELOG for more information on what has changed recently.
Testing
$ composer test
Contributing
Please see CONTRIBUTING and CODE_OF_CONDUCT for details.
Security
If you discover any security related issues, please email druc@pinsmile.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 27
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-09-08