1 | <?php |
||
20 | class Directory extends File |
||
21 | { |
||
22 | /** |
||
23 | * create the directory |
||
24 | * |
||
25 | * @since 3.2.0 |
||
26 | * |
||
27 | * @param string $directory name of the directory |
||
28 | * @param int $mode file access mode |
||
29 | * |
||
30 | * @return bool |
||
31 | */ |
||
32 | |||
33 | 2 | public function createDirectory(string $directory = null, int $mode = 0777) : bool |
|
38 | |||
39 | /** |
||
40 | * remove the directory |
||
41 | * |
||
42 | * @since 3.2.0 |
||
43 | * |
||
44 | * @param string $directory name of the directory |
||
45 | * |
||
46 | * @return bool |
||
47 | */ |
||
48 | |||
49 | 3 | public function removeDirectory(string $directory = null) : bool |
|
59 | |||
60 | /** |
||
61 | * clear the directory |
||
62 | * |
||
63 | * @since 3.2.0 |
||
64 | */ |
||
65 | |||
66 | 2 | public function clearDirectory() : void |
|
70 | |||
71 | /** |
||
72 | * remove the directory |
||
73 | * |
||
74 | * @param string $directory name of the directory |
||
75 | */ |
||
76 | |||
77 | 4 | protected function _remove(string $directory = null) : void |
|
96 | } |
||
97 |
In PHP, under loose comparison (like
==
, or!=
, orswitch
conditions), values of different types might be equal.For
string
values, the empty string''
is a special case, in particular the following results might be unexpected: