public function makeDirectory(string $path, int $mode = 0777, bool $isRecursive = false) : bool
    {
        $result = mkdir($path, $mode, $isRecursive);
        // The directory might not get the correct mode due to umask, so we have to chmod it
        chmod($path, $mode);

        return $result;
    }