Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
n/a
0 / 0
n/a
0 / 0
CRAP
n/a
0 / 0
1<?php
2/**
3 * Jingga
4 *
5 * PHP Version 8.1
6 *
7 * @package   phpOMS\System\File
8 * @copyright Dennis Eichhorn
9 * @license   OMS License 2.0
10 * @version   1.0.0
11 * @link      https://jingga.app
12 */
13declare(strict_types=1);
14
15namespace phpOMS\System\File;
16
17/**
18 * Filesystem class.
19 *
20 * Performing operations on the file system
21 *
22 * @package phpOMS\System\File
23 * @license OMS License 2.0
24 * @link    https://jingga.app
25 * @since   1.0.0
26 *
27 * @phpstan-extends \ArrayAccess<string, mixed>
28 * @phpstan-extends \Iterator<string, mixed>
29 */
30interface DirectoryInterface extends \ArrayAccess, \Iterator, ContainerInterface
31{
32    /**
33     * Get node by name.
34     *
35     * @param string $name File/direcotry name
36     *
37     * @return null|ContainerInterface
38     *
39     * @since 1.0.0
40     */
41    public function getNode(string $name) : ?ContainerInterface;
42
43    /**
44     * Add file or directory.
45     *
46     * @param ContainerInterface $file File to add
47     *
48     * @return self
49     *
50     * @since 1.0.0
51     */
52    public function addNode(ContainerInterface $file) : self;
53
54    /**
55     * Get files in directory.
56     *
57     * @return array
58     *
59     * @since 1.0.0
60     */
61    public function getList() : array;
62}