You are here

static function RealisticDummyContentEnvironment::validCandidateFilename in Realistic Dummy Content 7

1 call to RealisticDummyContentEnvironment::validCandidateFilename()
RealisticDummyContentEnvironment::SortCandidateFiles_ in api/includes/RealisticDummyContentEnvironment.inc
Given a list of candidate files, sort them by names and parts.

File

api/includes/RealisticDummyContentEnvironment.inc, line 258
Define RealisticDummyContentLiveEnvironment autoload class.

Class

RealisticDummyContentEnvironment
The abstract base environment.

Code

static function validCandidateFilename($name, $extensions = NULL) {
  if (self::LowercaseRadicalNoExtension($name) == 'readme') {
    return FALSE;
  }
  if (!$extensions) {
    return TRUE;
  }
  $filparts = self::getFileParts($name);
  return in_array($filparts['base_extension'], $extensions);
}