Disky 是一个用于 Laravel Flysystem 的简单插件包。但目前它只允许从一个磁盘复制到另一个磁盘。

v0.1.1 2017-09-19 15:04 UTC

This package is auto-updated.

Last update: 2024-08-27 03:49:09 UTC


README

Latest Version on Packagist Software License Build Status Coverage Status Quality Score Total Downloads

Disky 提供了一种简单的方法,通过一行代码即可从一个磁盘复制文件到另一个磁盘。

安装

通过 Composer

$ composer require roblesterjr04/disky

将服务提供者添加到 config/app.php

roblesterjr04\disky\DiskyServiceProvider::class,

使用

Storage::copyToDisk('path/to/file', 's3'); // Same as copying from disk('local');

Storage::disk('s3')->copyToDisk('path/to/file', 'ftp');

Storage::disk('ftp')->copyToDisk('path/to/file', 'local');

// Use the same logic to copy a directory

Storage::disk('ftp')->copyToDisk('path/to/directory', 's3');

支持多个文件!

Storage::copyToDisk(['path/to/file1','path/to/file2'], 's3');

// You can copy to multiple disks!
Storage::copyToDisk(['path/to/file1','path/to/file2'], ['s3','ftp']);

// You can specify one or more folder destinations on the destination drive(s)
Storage::copyToDisk('path/to/file', 's3', 'destination/path');

Storage::copyToDisk('path/to/file', 'ftp', ['destination/path1', 'destination/path2']);

变更日志

有关最近更改的更多信息,请参阅变更日志

测试

$ composer test

贡献

有关详细信息,请参阅贡献指南行为准则

安全

如果您发现任何与安全相关的问题,请通过 :author_email 发送电子邮件,而不是使用问题跟踪器。

鸣谢

许可证

MIT 许可证(MIT)。有关更多信息,请参阅许可证文件