sagnikrivud/php-folderaspire
最新稳定版本:v2.0.1
Composer 安装命令:
composer require sagnikrivud/php-folderaspire
包简介
Create dynamic folder at storage or any location
关键字:
README 文档
README
Automating folder generation in PHP can be done using the mkdir() function, which is used to create directories. Here's a brief example of how you can automatically generate folders:
- Custom PHP
- Wordpress
- Laravel (10.0 or Higher)
Versions and compatibility
- Php 8.0 or higher is required
- Apache 2
- Composer 2.0
Status
Under Development
Installation
Please follow this steps, and also refer the code blocks for ths setup using php dependency manager (composer). Open terminal and run this command, but this is need to remember that the user file or folder write permission should be given under same group, like user: sudo and group: www-data
in composer.json under require you can directly write "sagnikrivud/php-folderaspire" under require and run:
$ composer install
OR
You can directly run from terminal
$ composer require sagnikrivud/php-folderaspire
Use the Service Provider class at PHP file after auto loading configuration:
require __DIR__ . '/vendor/autoload.php';
use Sagnikd\FolderAspire\Classes\Folder;
$manageFolder = new Folder();
create a folder with permission
$manageFolder->createDirectory('path/to/directory_name', 775); //Return true/false
Import directory from an existing parent directory
$manageFolder->importDirectory('source/dir','destination/dir');
Get proper location or Path of a Folder or File
$manageFolder->getFolderLocation('folderName/fileName'); //Return "/FolderAspire/Config/Label.php"
Get a Namespace of Class or Service provider
$manageFolder->recoverNamespace(null,'path/to/class_file'); //Return "App\Http\Controllers"
Lock a directory
$manageFolder->lockDirectory('folder', 'path/to/folder'); //Return true/false
Remove folder or File
$manageFolder->removeFileOrDirectory('patha/to/file_or_direcory_name'); // Return true/false
Base/root directory
'Base' => env('BASE_ROOT', __DIR__),
💻 Tech Stack
统计信息
- 总下载量: 3
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-02-19