|
@@ 228-242 (lines=15) @@
|
| 225 |
|
* @param bool $showHidden = false |
| 226 |
|
* @return string[] an array with the directories in the current directory. |
| 227 |
|
*/ |
| 228 |
|
public function listDirectories($recursive = false, $showHidden = false) |
| 229 |
|
{ |
| 230 |
|
$result = []; |
| 231 |
|
|
| 232 |
|
foreach ($this->listAllIterator($recursive, $showHidden) as $element) { |
| 233 |
|
if ($element->isDir()) { |
| 234 |
|
$result[] = $element->getFilename(); |
| 235 |
|
} |
| 236 |
|
} |
| 237 |
|
|
| 238 |
|
return $result; |
| 239 |
|
} |
| 240 |
|
|
| 241 |
|
/** |
| 242 |
|
* Returns an array with the files in the current directory. |
| 243 |
|
* |
| 244 |
|
* @param bool $recursive = false |
| 245 |
|
* @param bool $showHidden = false |
|
@@ 210-222 (lines=13) @@
|
| 207 |
|
* @param bool $showHidden = false |
| 208 |
|
* @return string[] an array with the files and directories in the current directory. |
| 209 |
|
*/ |
| 210 |
|
public function listAll($recursive = false, $showHidden = false) |
| 211 |
|
{ |
| 212 |
|
$result = []; |
| 213 |
|
|
| 214 |
|
foreach ($this->listAllIterator($recursive, $showHidden) as $element) { |
| 215 |
|
$result[] = $element->getFilename(); |
| 216 |
|
} |
| 217 |
|
|
| 218 |
|
return $result; |
| 219 |
|
} |
| 220 |
|
|
| 221 |
|
/** |
| 222 |
|
* Returns an array with the directories in the current directory. |
| 223 |
|
* |
| 224 |
|
* @param bool $recursive = false |
| 225 |
|
* @param bool $showHidden = false |
|
@@ 248-262 (lines=15) @@
|
| 245 |
|
* @param bool $showHidden = false |
| 246 |
|
* @return string[] an array with the files in the current directory. |
| 247 |
|
*/ |
| 248 |
|
public function listFiles($recursive = false, $showHidden = false) |
| 249 |
|
{ |
| 250 |
|
$result = []; |
| 251 |
|
|
| 252 |
|
foreach ($this->listAllIterator($recursive, $showHidden) as $element) { |
| 253 |
|
if ($element->isFile()) { |
| 254 |
|
$result[] = $element->getFilename(); |
| 255 |
|
} |
| 256 |
|
} |
| 257 |
|
|
| 258 |
|
return $result; |
| 259 |
|
} |
| 260 |
|
|
| 261 |
|
/** |
| 262 |
|
* Returns true if the file has been created. |
| 263 |
|
* |
| 264 |
|
* @param bool $override = false |
| 265 |
|
* @return bool true if the file has been created. |