1 | <?php |
||
7 | class Directory implements \Iterator { |
||
8 | |||
9 | use FileOperationTrait; |
||
10 | |||
11 | private $iterator; |
||
12 | |||
13 | public function __construct($filename) { |
||
16 | |||
17 | /** |
||
18 | * Creates the directory |
||
19 | * |
||
20 | * @throws FileException when something goes wrong |
||
21 | * @param number $mode |
||
22 | */ |
||
23 | public function make($mode = 0777) { |
||
28 | |||
29 | /** |
||
30 | * Recursively deletes the directory |
||
31 | * |
||
32 | * @throws FileException when something goes wrong |
||
33 | */ |
||
34 | public function delete() { |
||
45 | |||
46 | /** |
||
47 | * Returns a directory iterator |
||
48 | * |
||
49 | * @return DirectoryIterator |
||
50 | */ |
||
51 | private function getIterator() { |
||
57 | |||
58 | /** |
||
59 | * @return FileDescriptor |
||
60 | * @internal |
||
61 | */ |
||
62 | public function current () { |
||
65 | |||
66 | /** |
||
67 | * @internal |
||
68 | */ |
||
69 | public function key () { |
||
72 | |||
73 | /** |
||
74 | * @internal |
||
75 | */ |
||
76 | public function next () { |
||
79 | |||
80 | /** |
||
81 | * @internal |
||
82 | */ |
||
83 | public function rewind () { |
||
86 | |||
87 | /** |
||
88 | * @internal |
||
89 | */ |
||
90 | public function valid () { |
||
93 | |||
94 | /** |
||
95 | * String representation of this directory as pathname |
||
96 | */ |
||
97 | public function __toString() { |
||
100 | } |
||
101 |