FileValidatorZip::isValidFilename()

Is the given filename allowed for extraction from a ZIP file?

This is an API method for external use, and is not used directly by this module. This method looks at the filename only for given $options only, it does not validate size.

Usage

$bool = $fileValidatorZip->isValidFilename(string $filename, array $options);

Arguments

NameType(s)Description
$filenamestring
$optionsarray
  • extractFiles (array): Filenames or regex patterns for files to extract, ignoring all others. Default:[]
  • extractExtensions (array): Only extract these file extensions, ignoring all others. Default:[]
  • ignoreFiles (array): Filenames or regex patterns matching files to skip/ignore Default:[ '.DS_Store' ]
  • ignoreExtensions (array): Extensions to skip/ignore Default:[ 'zip' ]

Return value

bool


FileValidatorZip methods and properties

API reference based on ProcessWire core version 3.0.253