\Greg\Support\Dir
is working with directories.
Make a directory.
make(string $dir, boolean $recursive = false): boolean
$dir
- Directory;
$recursive
- Make recursive.
Example:
\Greg\Support\Dir::make(__DIR__ . '/storage');
Remove a directory.
unlink(string $dir): boolean
$dir
- Directory.
Example:
\Greg\Support\Dir::unlink(__DIR__ . '/storage');
Copy a directory.
copy(string $source, string $destination, int $permissions = 0755): boolean
$source
- Source folder;
$destination
- Destination folder;
$permissions
- Permissions.
Example:
\Greg\Support\Dir::copy(__DIR__ . '/storage', __DIR__ . '/tmp');