public function ArchiveTar::setIgnoreList in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/lib/Drupal/Core/Archiver/ArchiveTar.php \Drupal\Core\Archiver\ArchiveTar::setIgnoreList()
This method sets the regular expression for ignoring all files and directories matching the filenames in the array list at import, for example: $arch->setIgnoreList(array('CVS', '.svn', 'bin/tool'));
@access public
Parameters
array $list a list of file or directory names to ignore:
File
- core/
lib/ Drupal/ Core/ Archiver/ ArchiveTar.php, line 771
Class
Namespace
Drupal\Core\ArchiverCode
public function setIgnoreList($list) {
$regexp = str_replace(array(
'#',
'.',
'^',
'$',
), array(
'\\#',
'\\.',
'\\^',
'\\$',
), $list);
$regexp = '#/' . join('$|/', $list) . '#';
$this
->setIgnoreRegexp($regexp);
}