Skip to content

Latest commit

 

History

History
64 lines (41 loc) · 939 Bytes

Dir.md

File metadata and controls

64 lines (41 loc) · 939 Bytes

Directory Documentation

\Greg\Support\Dir is working with directories.

Table of contents:

Methods:

  • make - Make a directory;
  • unlink - Remove a directory;
  • copy - Copy a directory.

make

Make a directory.

make(string $dir, boolean $recursive = false): boolean

$dir - Directory;
$recursive - Make recursive.

Example:

\Greg\Support\Dir::make(__DIR__ . '/storage');

unlink

Remove a directory.

unlink(string $dir): boolean

$dir - Directory.

Example:

\Greg\Support\Dir::unlink(__DIR__ . '/storage');

copy

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');