FileTree final class
Minn\Support\FileTree · public/minn/src/Minn/Support/FileTree.php · 70 lines
Whole-directory reads and copies. The engine's own installer, the update unpacker and the plugins that reach for WordPress's copy_dir all want the same two operations: list a tree, and duplicate one.
Public
| static | files(string $dir, int $depth = 0, array $skip = array ( ), int $level = 1): array|false# | Every file under a directory, and every directory itself with a trailing slash, to the given depth. Depth 0 means no limit; depth 1 stops at the directory's own entries and names its subdirectories without descending.
@return list<string>|false false when the directory cannot be read | |||
| static | copy(string $from, string $to, array $skip = array ( )): bool# | Copies a directory's contents into another, creating it if it is not there. Names in $skip are left behind at the top level only, which is how the update unpacker keeps a directory it means to preserve.
|
Nothing matches.