public function createDirectory($directory)
    {
        $this->init();
        $path = $this->dir . $directory;
        if (!file_exists($path)) {
            mkdir($path, 0777, true);
        }

        return $this;
    }