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