Copied!

Generic executable finder.

CloneableInstantiable
Methods
public addSuffix(string $suffix) : void
 

Adds new possible suffix to check for executable, including the dot (.).

$finder = new ExecutableFinder(); $finder->addSuffix('.foo');

public find(string $name, ?string $default = NULL, array $extraDirs = []) : ?string
 

Finds an executable by name.

  • param string $name The executable name (without the extension)
  • param string|null $default The default to return if no executable is found
  • param array $extraDirs Additional dirs to check into
public setSuffixes(array $suffixes) : void
 

Replaces default suffixes of executable.

Constants
private Symfony\Component\Process\ExecutableFinder::CMD_BUILTINS = ['assoc', 'break', 'call', 'cd', 'chdir', 'cls', 'color', 'copy', 'date', 'del', 'dir', 'echo', 'endlocal', 'erase', 'exit', 'for', 'ftype', 'goto', 'help', 'if', 'label', 'md', 'mkdir', 'mklink', 'move', 'path', 'pause', 'popd', 'prompt', 'pushd', 'rd', 'rem', 'ren', 'rename', 'rmdir', 'set', 'setlocal', 'shift', 'start', 'time', 'title', 'type', 'ver', 'vol']
Properties
private array $suffixes = []
© 2025 Bruce Wells
Search Namespaces \ Classes
Configuration