where 4.3.1

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 85

Where.dart

Runtime Release License Coverage Build

Find the instances of an executable in the system path, implemented in Dart.

Resources

License

Where.dart is distributed under the MIT License.

Changelog

Version 4.3.1

  • Fixed a packaging issue.

Version 4.3.0

  • Added the Options class, used by the command line interface.
  • Raised the Dart SDK constraint.
  • Updated the package dependencies.

Version 4.2.0

  • Added an example code.
  • Raised the Dart SDK constraint.
  • Updated the package dependencies.

Version 4.1.0

  • Dropped support of Node.js platform.
  • Raised the Dart SDK constraint.
  • Using optional const and new.
  • Updated the package dependencies.

Version 4.0.0

  • Breaking change: starting to use and support the Dart 2 SDK.
  • Added a user guide based on MkDocs.
  • Added the FinderException class.
  • Updated the package dependencies.

Version 3.0.0

  • Added support for Node.js platform.
  • Breaking change: removed the FileStat.stat() method.
  • Breaking change: renamed the FileStat class to FileStats.
  • Added the fileSystem, platform and processManager constants.
  • Added the getFileStats() function.
  • Added the arguments and exitCode properties.

Version 2.2.0

  • Updated the package dependencies.

Version 2.1.1

  • Fixed a bug: the CLI script doesn't run when using the pub global run command.

Version 2.1.0

  • Changed the signature of the FileStat class constructor.

Version 2.0.0

  • Breaking change: changed the signature of the Finder class constructor.
  • Breaking change: removed the Application class.
  • Breaking change: the version property is now private.
  • Converted the constructor of the FileStat class to a constant one.
  • Updated the package dependencies.

Version 1.1.0

Version 1.0.0

  • Added a command line interface.
  • Added new unit tests.

Version 0.1.0

  • Initial release.

example/main.dart

import 'dart:async';
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');
  }
}

Use this package as an executable

1. Install it

You can install the package from the command line:


$ pub global activate where

2. Use it

The package has the following executables:


$ where

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  where: ^4.3.1

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter packages get

Alternatively, your editor might support pub get or flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:where/where.dart';
  
Version Uploaded Documentation Archive
4.3.1 Aug 6, 2018 Go to the documentation of where 4.3.1 Download where 4.3.1 archive
4.3.0 Aug 6, 2018 Go to the documentation of where 4.3.0 Download where 4.3.0 archive
4.2.0 Jul 21, 2018 Go to the documentation of where 4.2.0 Download where 4.2.0 archive
4.1.0 Jun 23, 2018 Go to the documentation of where 4.1.0 Download where 4.1.0 archive
4.0.0 Mar 5, 2018 Go to the documentation of where 4.0.0 Download where 4.0.0 archive
3.0.0 Dec 6, 2017 Go to the documentation of where 3.0.0 Download where 3.0.0 archive
2.2.0 Nov 3, 2017 Go to the documentation of where 2.2.0 Download where 2.2.0 archive
2.1.1 Sep 15, 2017 Go to the documentation of where 2.1.1 Download where 2.1.1 archive
2.1.0 Sep 11, 2017 Go to the documentation of where 2.1.0 Download where 2.1.0 archive
2.0.0 Sep 11, 2017 Go to the documentation of where 2.0.0 Download where 2.0.0 archive

All 13 versions...

Popularity:
Describes how popular the package is relative to other packages. [more]
70
Health:
Code health derived from static analysis. [more]
98
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
85
Learn more about scoring.

We analyzed this package on Aug 14, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0
  • pana: 0.11.8

Platforms

Detected platforms: Flutter, other

Primary library: package:where/where.dart with components: io.

Suggestions

Format lib/src/cli/options.dart.

Run dartfmt to format lib/src/cli/options.dart.

Format lib/src/io/file_stats.dart.

Run dartfmt to format lib/src/io/file_stats.dart.

Format lib/src/io/finder.dart.

Run dartfmt to format lib/src/io/finder.dart.

Format lib/src/io/where.dart.

Run dartfmt to format lib/src/io/where.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
build_cli_annotations ^1.0.0 1.0.0
meta ^1.1.6 1.1.6
path ^1.6.2 1.6.2
pubspec_parse ^0.1.2 0.1.2+2
Transitive dependencies
args 1.5.0
charcode 1.1.2
collection 1.14.11
json_annotation 1.1.0
pub_semver 1.4.2
source_span 1.4.1
string_scanner 1.0.4
yaml 2.1.15
Dev dependencies
build_cli ^1.0.0
build_runner ^0.10.0
build_test ^0.10.3
coverage ^0.12.2
grinder ^0.8.3
test ^1.3.0