| @@ 290-298 (lines=9) @@ | ||
| 287 | return IteratorDirectory::wrap($names); |
|
| 288 | } |
|
| 289 | ||
| 290 | public function filetype($path) { |
|
| 291 | try { |
|
| 292 | return $this->getFileInfo($path)->isDirectory() ? 'dir' : 'file'; |
|
| 293 | } catch (NotFoundException $e) { |
|
| 294 | return false; |
|
| 295 | } catch (ForbiddenException $e) { |
|
| 296 | return false; |
|
| 297 | } |
|
| 298 | } |
|
| 299 | ||
| 300 | public function mkdir($path) { |
|
| 301 | $path = $this->buildPath($path); |
|
| @@ 310-319 (lines=10) @@ | ||
| 307 | } |
|
| 308 | } |
|
| 309 | ||
| 310 | public function file_exists($path) { |
|
| 311 | try { |
|
| 312 | $this->getFileInfo($path); |
|
| 313 | return true; |
|
| 314 | } catch (NotFoundException $e) { |
|
| 315 | return false; |
|
| 316 | } catch (ForbiddenException $e) { |
|
| 317 | return false; |
|
| 318 | } |
|
| 319 | } |
|
| 320 | ||
| 321 | /** |
|
| 322 | * check if smbclient is installed |
|