function Git::checkIgnore
Determines whether the specified scaffold file is already ignored.
Parameters
\Composer\IO\IOInterface $io: The Composer IO interface.
string $path: Path to scaffold file to check.
string $dir: Base directory for git process.
Return value
bool Whether the specified file is already ignored or not (TRUE if ignored).
2 calls to Git::checkIgnore()
- ManageGitIgnore::manageIgnored in composer/
Plugin/ Scaffold/ ManageGitIgnore.php  - Manages gitignore files.
 - ManageGitIgnore::managementOfGitIgnoreEnabled in composer/
Plugin/ Scaffold/ ManageGitIgnore.php  - Determines whether we should manage gitignore files.
 
File
- 
              composer/
Plugin/ Scaffold/ Git.php, line 36  
Class
- Git
 - Provide some Git utility operations.
 
Namespace
Drupal\Composer\Plugin\ScaffoldCode
public static function checkIgnore(IOInterface $io, $path, $dir = NULL) {
  $process = new ProcessExecutor($io);
  $output = '';
  $exitCode = $process->execute('git check-ignore ' . $process->escape($path), $output, $dir);
  return $exitCode == 0;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.