IOException.php 948 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Symfony\Component\Filesystem\Exception;
  11. /**
  12. * Exception class thrown when a filesystem operation failure happens
  13. *
  14. * @author Romain Neutron <imprec@gmail.com>
  15. * @author Christian Gärtner <christiangaertner.film@googlemail.com>
  16. * @author Fabien Potencier <fabien@symfony.com>
  17. *
  18. * @api
  19. */
  20. class IOException extends \RuntimeException implements IOExceptionInterface
  21. {
  22. private $path;
  23. public function __construct($message, $code = 0, \Exception $previous = null, $path = null)
  24. {
  25. $this->path = $path;
  26. parent::__construct($message, $code, $previous);
  27. }
  28. /**
  29. * {@inheritdoc}
  30. */
  31. public function getPath()
  32. {
  33. return $this->path;
  34. }
  35. }