ExecutableFinder
in package
Generic executable finder.
Tags
Table of Contents
- $suffixes : mixed
- addSuffix() : mixed
- Adds new possible suffix to check for executable.
- find() : string|null
- Finds an executable by name.
- setSuffixes() : mixed
- Replaces default suffixes of executable.
Properties
$suffixes
private
mixed
$suffixes
= ['.exe', '.bat', '.cmd', '.com']
Methods
addSuffix()
Adds new possible suffix to check for executable.
public
addSuffix(string $suffix) : mixed
Parameters
- $suffix : string
Return values
mixed —find()
Finds an executable by name.
public
find(string $name[, string|null $default = null ][, array<string|int, mixed> $extraDirs = [] ]) : string|null
Parameters
- $name : string
-
The executable name (without the extension)
- $default : string|null = null
-
The default to return if no executable is found
- $extraDirs : array<string|int, mixed> = []
-
Additional dirs to check into
Return values
string|null —The executable path or default value
setSuffixes()
Replaces default suffixes of executable.
public
setSuffixes(array<string|int, mixed> $suffixes) : mixed
Parameters
- $suffixes : array<string|int, mixed>