protected function createDirectory($path) { if (!file_exists($path) && !mkdir($path)) { throw new FileCreationException(sprintf('Can\'t create the directory: %s', $path)); } }