Which class

Search results container for executable location queries.

This class holds the results of a PATH search operation, including all found locations and status information.

Example:

final result = which('python');

if (result.found) {
  print('Primary location: ${result.path}');
  print('All locations: ${result.paths}');
} else {
  print('Python not found in PATH');
}

Constructors

Which()

Properties

found bool
Whether the application was found in at least one PATH location.
no setter
hashCode int
The hash code for this object.
no setterinherited
notfound bool
Whether the application was not found in any PATH location.
no setter
path String?
The primary path where the application was found.
no setter
paths List<String>
All paths where the application was found.
no setter
progress Stream<String>?
The progress used to accumualte the results If verbose was passed this will contain all of the verbose output. If you passed a progress into the which call then this will be the same progress otherwse a Progress.devNull will be allocated and returned.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited