createCompletionConfigDir method

  1. @visibleForTesting
void createCompletionConfigDir()

Create a directory in which the completion config files shall be saved. If the directory already exists, it will do nothing.

The directory is defined by completionConfigDir.

Implementation

@visibleForTesting
void createCompletionConfigDir() {
  final completionConfigDirPath = completionConfigDir.path;

  logger.info(
    'Creating completion configuration directory '
    'at $completionConfigDirPath',
  );

  if (completionConfigDir.existsSync()) {
    logger.warn(
      'A ${completionConfigDir.path} directory was already found.',
    );
    return;
  }

  completionConfigDir.createSync();
}