Function Hook_health_check_security->getBaseDirectoriesFiles

Definitions

sources/hooks/systems/health_checks/security.php

  • Find files in base-like directories.
  • Visibility: protected
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: array

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$file_extensions ?array No No [ "php" ] N/A N/A File extensions to limit to (no dots), if $files_wanted set (null: no limit)
$files_wanted boolean No No True N/A N/A Whether to get files (if not, will return directories instead of files)

Returns

  • List of file paths relative to real base directory
  • Type: array
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Find files in base-like directories.
 *
 * @param  ?array $file_extensions File extensions to limit to (no dots), if $files_wanted set (null: no limit)
 * @param  boolean $files_wanted Whether to get files (if not, will return directories instead of files)
 * @return array List of file paths relative to real base directory
 */

protected function getBaseDirectoriesFiles(?array $file_extensions = ["php"], bool $files_wanted = true) : array