private function createDirectoryIfItDoesExist($filepath) { $path = dirname($filepath); if (!$this->filesystem->isDirectory($path)) { $this->filesystem->makeDirectory($path); } }