Upgrade to 3.1.0

This commit is contained in:
Bastian Allgeier
2019-03-19 11:07:14 +01:00
parent 418db4b09b
commit 6e074142f1
98 changed files with 1266 additions and 299 deletions

View File

@@ -3,9 +3,19 @@
namespace Kirby\Toolkit;
use Exception;
use Throwable;
/**
* Low level directory handling utilities
* The `Dir` class provides methods
* for dealing with directories on the
* file system level, like creating,
* listing, moving, copying or
* evaluating directories etc.
*
* @package Kirby Toolkit
* @author Bastian Allgeier <bastian@getkirby.com>
* @link http://getkirby.com
* @copyright Bastian Allgeier
*/
class Dir
{
@@ -174,7 +184,11 @@ class Dir
throw new Exception(sprintf('The directory "%s" does not exist and cannot be linked', $source));
}
return symlink($source, $link);
try {
return symlink($source, $link) === true;
} catch (Throwable $e) {
return false;
}
}
/**