Function CMSPermissionsScanner->process_directory
Definitions
sources/file_permissions_check.php
- Enumerate a directory for permission checks (actual processing is in process_node).
- Visibility: public
- Is abstract?: Yes
- Is static?: No
- Is final?: No
- Returns: array
Parameters
Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
---|---|---|---|---|---|---|---|
$path | PATH | No | No | required parameter | N/A | N/A | The absolute path |
$rel_path | PATH | No | No | Blank (empty string) | N/A | N/A | The relative path to the base directory |
$attr | ?string | No | No | Null | N/A | N/A | A string of extended attributes from lsattr (null: look up individually, which is slower) |
$top_level | boolean | No | No | True | N/A | N/A | Whether this is the top level of the recursion; don't set this manually |
&$paths | array | Yes | No | [] | N/A | N/A | Paths with issues (inverse list), returned by reference |
&$found_any_issue | boolean | Yes | No | False | N/A | N/A | Whether any issues were found, returned by reference |
Returns
- A tuple: Messages to show, Commands to run
- Type: array
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Enumerate a directory for permission checks (actual processing is in process_node).
*
* @param PATH $path The absolute path
* @param PATH $rel_path The relative path to the base directory
* @param ?string $attr A string of extended attributes from lsattr (null: look up individually, which is slower)
* @param boolean $top_level Whether this is the top level of the recursion; don't set this manually
* @param array $paths Paths with issues (inverse list), returned by reference
* @param boolean $found_any_issue Whether any issues were found, returned by reference
* @return array A tuple: Messages to show, Commands to run
*/
abstract public function process_directory(string $path, string $rel_path = '', ?string $attr = null, bool $top_level = true, array &$paths = [], bool &$found_any_issue = false) : array
* Enumerate a directory for permission checks (actual processing is in process_node).
*
* @param PATH $path The absolute path
* @param PATH $rel_path The relative path to the base directory
* @param ?string $attr A string of extended attributes from lsattr (null: look up individually, which is slower)
* @param boolean $top_level Whether this is the top level of the recursion; don't set this manually
* @param array $paths Paths with issues (inverse list), returned by reference
* @param boolean $found_any_issue Whether any issues were found, returned by reference
* @return array A tuple: Messages to show, Commands to run
*/
abstract public function process_directory(string $path, string $rel_path = '', ?string $attr = null, bool $top_level = true, array &$paths = [], bool &$found_any_issue = false) : array