From ae7b39df7e72909b7c7cbba3c9e6da3866c977e4 Mon Sep 17 00:00:00 2001 From: gaobinzhan Date: Wed, 17 Mar 2021 18:22:34 +0800 Subject: [PATCH] add: return val --- src/FileSystem.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/FileSystem.php b/src/FileSystem.php index 011fafc..ced5c1c 100644 --- a/src/FileSystem.php +++ b/src/FileSystem.php @@ -5,8 +5,6 @@ use \Exception; use \Throwable; use \FilesystemIterator; -use \RecursiveDirectoryIterator; -use \RecursiveIteratorIterator; /** * Class FileSystem @@ -295,12 +293,14 @@ public function glob(string $pattern, int $flags = 0) * @param string $path * @param int $mode * @param bool $recursive + * @return bool */ public function ensureDirectoryExists(string $path, $mode = 0755, bool $recursive = true) { if (!$this->isDirectory($path)) { - $this->makeDirectory($path, $mode, $recursive); + return $this->makeDirectory($path, $mode, $recursive); } + return true; } /**