1 | <?php |
||
13 | class Dir |
||
14 | { |
||
15 | /** |
||
16 | * Change directory |
||
17 | * |
||
18 | * @param string $directory The new current directory |
||
19 | * |
||
20 | * @return bool |
||
21 | */ |
||
22 | public function chDir(string $directory) : bool |
||
26 | |||
27 | /** |
||
28 | * Change the root directory |
||
29 | * |
||
30 | * @param string $directory The path to change the root directory to. |
||
31 | * |
||
32 | * @return bool |
||
33 | */ |
||
34 | public function chroot(string $directory) : bool |
||
38 | |||
39 | /** |
||
40 | * Close directory handle |
||
41 | * |
||
42 | * @param resource $dirHandle The directory handle resource previously opened |
||
43 | * with opendir. If the directory handle is |
||
44 | * not specified, the last link opened by opendir |
||
45 | * is assumed. |
||
46 | * |
||
47 | * @return void |
||
48 | */ |
||
49 | public function closeDir($dirHandle = null) |
||
53 | |||
54 | /** |
||
55 | * Return an instance of the Directory class |
||
56 | * |
||
57 | * @param string $directory |
||
58 | * @param resource $context |
||
59 | * |
||
60 | * @return Directory |
||
61 | */ |
||
62 | public function dir(string $directory, $context = null) : Directory |
||
66 | |||
67 | /** |
||
68 | * Gets the current working directory |
||
69 | * |
||
70 | * @return string |
||
71 | */ |
||
72 | public function getcwd() : string |
||
76 | |||
77 | /** |
||
78 | * Open directory handle |
||
79 | * |
||
80 | * @param string $path The directory path that is to be opened |
||
81 | * @param resource $context For a description of the context parameter, |
||
82 | * refer to the streams section of |
||
83 | * the manual. |
||
84 | * |
||
85 | * @return resource |
||
86 | */ |
||
87 | public function openDir(string $path, $context = null) |
||
91 | |||
92 | /** |
||
93 | * Read entry from directory handle |
||
94 | * |
||
95 | * @param resource $dirHandle The directory handle resource previously opened |
||
96 | * with opendir. If the directory handle is |
||
97 | * not specified, the last link opened by opendir |
||
98 | * is assumed. |
||
99 | * |
||
100 | * @return string |
||
101 | */ |
||
102 | public function readdDr($dirHandle = null) : string |
||
106 | |||
107 | /** |
||
108 | * Rewind directory handle |
||
109 | * |
||
110 | * @param resource $dirHandle The directory handle resource previously opened |
||
111 | * with opendir. If the directory handle is |
||
112 | * not specified, the last link opened by opendir |
||
113 | * is assumed. |
||
114 | * |
||
115 | * @return void |
||
116 | */ |
||
117 | public function rewindDir($dirHandle = null) |
||
121 | |||
122 | /** |
||
123 | * List files and directories inside the specified path |
||
124 | * |
||
125 | * @param string $directory The directory that will be scanned. |
||
126 | * @param int $sortingOrder By default, the sorted order is alphabetical in ascending order. If |
||
127 | * the optional sorting_order is set to |
||
128 | * SCANDIR_SORT_DESCENDING, then the sort order is |
||
129 | * alphabetical in descending order. If it is set to |
||
130 | * SCANDIR_SORT_NONE then the result is unsorted. |
||
131 | * @param resource $context For a description of the context parameter, |
||
132 | * refer to the streams section of |
||
133 | * the manual. |
||
134 | * |
||
135 | * @return array |
||
136 | */ |
||
137 | public function scanDir(string $directory, int $sortingOrder = null, $context = null) : array |
||
141 | |||
142 | } |
||
143 | |||
144 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.