sagnikrivud/php-folderaspire

Create dynamic folder at storage or any location

Maintainers

👁 Sagnik Dey

Package info

github.com/sagnikrivud/php-folderaspire

pkg:composer/sagnikrivud/php-folderaspire

Statistics

Installs: 3

Dependents: 0

Suggesters: 0

Stars: 2

Open Issues: 0

v2.0.1 2024-02-19 09:48 UTC

Requires

Requires (Dev)

Suggests

None

Provides

None

Conflicts

None

Replaces

None

MIT 98ab87e3b1cb8c4836ca2a9a56fc7be5af377919

  • Sagnik Dey <sagnikcoold.woop@gmail.com>

phpwordpress

This package is not auto-updated.

Last update: 2026-06-23 15:26:52 UTC


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

Status

👁 Please check 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

👁 CSS3
👁 PHP
👁 HTML5
👁 JavaScript
👁 AWS
👁 Vue.js
👁 Vuetify
👁 NPM
👁 jQuery
👁 Express.js
👁 Laravel
👁 NuxtJS
👁 Socket.io
👁 Apache
👁 MariaDB
👁 MongoDB
👁 MySQL
👁 SQLite
👁 Inkscape
👁 Jira
👁 Vagrant
👁 Shell
👁 Cakephp
👁 Arduino
👁 C++
👁 MsSQLServer
👁 CodeIgniter
👁 Lumen
👁 Node.js