public static function getFileExtension() { return 'yml';
} /**
* Check if the directory exists and create it if not.
*/
protected function ensureStorage() { $dir =
$this->
getCollectionDirectory();
$success =
$this->
getFileSystem()->
prepareDirectory($dir, FileSystemInterface::CREATE_DIRECTORY | FileSystemInterface::MODIFY_PERMISSIONS
);
// Only create .htaccess file in root directory.
if ($dir ==
$this->directory
) { $success =
$success && FileSecurity::
writeHtaccess($this->directory
);
} if (!
$success) { throw new StorageException('Failed to create config directory ' .
$dir);
} return $this;
} /**
* {@inheritdoc}
*/