qtran2015 / storage-dir

操作存储目录中的目录

1.2.0 2023-10-29 17:36 UTC

This package is auto-updated.

Last update: 2024-09-29 19:32:43 UTC


README

Laravel 包 - 在存储目录中创建新目录

安装

composer require qtran2015/storage-dir

添加到 config/app.php 应用程序服务提供者

Qtran2015\StorageDir\StorageDirProvider::class

清除缓存

php artisan optimize:clear

使用响应状态

存在 | 创建 | 失败

默认读执行

$response = \Qtran2015\StorageDir\StorageDir::setDir('test1/dir_1/dir_2')->execute();

读写执行

$response = \Qtran2015\StorageDir\StorageDir::setDir('test2/dir_1/dir_2')
        ->fullAccess()
        ->execute();

从提供的路径中移除目录的完整访问权限

$response = \Qtran2015\StorageDir\StorageDir::setDir('test2/dir_1/dir_2/dir_3')
        ->removeFullAccessDir('dir_1')
        ->execute();

从提供的路径中给予目录完整访问权限

$response = \Qtran2015\StorageDir\StorageDir::setDir('test1/dir_1/dir_2')
        ->giveFullAccessDir('dir_2')
        ->execute();