Directory.php 554 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. namespace League\Flysystem;
  3. /**
  4. * @deprecated
  5. */
  6. class Directory extends Handler
  7. {
  8. /**
  9. * Delete the directory.
  10. *
  11. * @return bool
  12. */
  13. public function delete()
  14. {
  15. return $this->filesystem->deleteDir($this->path);
  16. }
  17. /**
  18. * List the directory contents.
  19. *
  20. * @param bool $recursive
  21. *
  22. * @return array|bool directory contents or false
  23. */
  24. public function getContents($recursive = false)
  25. {
  26. return $this->filesystem->listContents($this->path, $recursive);
  27. }
  28. }