Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Filesystem] Added few new behaviors:
- add a IOException and a main filesystem exception interface - whenever an action fails, an IOException is thrown - add access to the second and third arguments of touch() function - add a recursive option for chmod() - add a chown() method - add a chgrp() method - Switch the 'unlink' global function in Filesystem::symlink to Filesystem::remove. BC break: mkdir() function now throws exception in case of failure instead of returning Boolean value.
- Loading branch information
1 parent
0b8b76b
commit 24eb396
Showing
5 changed files
with
402 additions
and
61 deletions.
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
src/Symfony/Component/Filesystem/Exception/ExceptionInterface.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the Symfony package. | ||
* | ||
* (c) Fabien Potencier <fabien@symfony.com> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Symfony\Component\Filesystem\Exception; | ||
|
||
/** | ||
* Exception interface for all exceptions thrown by the component. | ||
* | ||
* @author Romain Neutron <imprec@gmail.com> | ||
* | ||
* @api | ||
*/ | ||
interface ExceptionInterface | ||
{ | ||
|
||
} |
24 changes: 24 additions & 0 deletions
24
src/Symfony/Component/Filesystem/Exception/IOException.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the Symfony package. | ||
* | ||
* (c) Fabien Potencier <fabien@symfony.com> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Symfony\Component\Filesystem\Exception; | ||
|
||
/** | ||
* Exception class thrown when a filesystem operation failure happens | ||
* | ||
* @author Romain Neutron <imprec@gmail.com> | ||
* | ||
* @api | ||
*/ | ||
class IOException extends \RuntimeException implements ExceptionInterface | ||
{ | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.