consilience/laravel-storage-ls
Composer 安装命令:
composer require consilience/laravel-storage-ls
包简介
List the contents of Laravel file systems.
README 文档
README
List the files of Laravel file systems (aka disks) through a simple artisan command.
Laravel abstracts filesystems, both local and remote,
using the flysystem package and its adapters.
The abstract unit on Laravel or Lumen for a filesystem is a disk,
and each disk is configured in config/filesystems.php.
This package provides an artisan command (storage:ls) to quickly and easily peek into a disk
to see files and directories.
The command is read-only, so will not allow files or directories to be added, removed or modified. Any excpetions are left purposely unhandled, so it can aid diagnosing connection problems. There is no interaction expected, so the command can be used in an automated pipeline, and also in environments such as vapor that allow you to run artisan commands, but offer no interactive shell.
Usage
List storage disks
$ php artisan storage:ls
This will return a list of the available disks with the default flagged [*]:
Available disks:
+-----------+--------+
| name | driver |
+-----------+--------+
| local [*] | local |
| public | local |
| s3 | s3 |
+-----------+--------+
List files/directories in given disk
$ php artisan storage:ls --disk=s3 # or $ php artisan storage:ls -d s3 # or $ php artisan storage:ls s3:
# Short format $ php artisan storage:ls -d local .gitignore public # Long format (directory flag, size bytes, date/time UTC, file or directory name) $ php artisan storage:ls -d local -l - 14 2019-03-05 14:27:03 .gitignore d 0 2019-08-21 11:19:46 public
List files and directories in given directory
$ php artisan storage:ls -d s3 my-folder/sub-folder // or separate the disk and directory with a colon $ php artisan storage:ls s3:my-folder/sub-folder
List files and directories recursively
$ php artisan storage:ls -d local -R
/:
.gitignore
public
/public:
dirA
dirB
xyzFile
public/dirA:
public/dirB:
foobarFile
Similarly, in long format:
$ php artisan storage:ls -d local -Rl
/:
- 14 2019-03-05 14:27:03 .gitignore
d 0 2019-08-21 22:16:46 public
/public:
d 0 2019-08-21 22:16:43 dirB
d 0 2019-08-21 22:17:08 dirB
- 6 2019-08-21 21:54:54 xyzFile
public/dirA:
public/dirB:
- 5 2019-08-21 22:17:08 foobarFile
Installation
Laravel and Lumen
composer require consilience/laravel-storage-ls
There is no further configuration to do on Laravel.
Lumen
Since Lumen does not do discovery on service providers, the provider needs
to be manually registered in bootstrap/app.php:
$app->register(Consilience\Laravel\Ls\Providers\LsProvider::class);
consilience/laravel-storage-ls 适用场景与选型建议
consilience/laravel-storage-ls 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 12.06k 次下载、GitHub Stars 达 3, 最近一次更新时间为 2019 年 08 月 21 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 consilience/laravel-storage-ls 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 consilience/laravel-storage-ls 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 12.06k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-08-21