where 6.1.0 where: ^6.1.0 copied to clipboard
Find the instances of an executable in the system path. Like the `which` Linux command.
import 'package:where/where.dart';
/// Finds the instances of an executable.
Future<void> main() async {
try {
// `path` is the absolute path to the executable.
final path = await where('foobar');
print('The command "foobar" is located at: $path');
}
on FinderException catch (err) {
print('The command "${err.command}" is not found');
}
}