diff --git a/src/HeadlessChrome.php b/src/HeadlessChrome.php index cb06880..f8a0257 100644 --- a/src/HeadlessChrome.php +++ b/src/HeadlessChrome.php @@ -132,11 +132,13 @@ public function setUrl($url) /** * Set the directory for render output (PDF / Screenshot) * @param String $directory + * @param int $mode + * @param bool $recursive */ - public function setOutputDirectory($directory) + public function setOutputDirectory($directory, $mode = 0777, $recursive = false) { if (!file_exists($directory) || !realpath($directory)) { - @mkdir($directory); + @mkdir($directory, $mode, $recursive); } $this->outputDirectory = realpath(trim($directory)); }