Updated search for pub cache directory on windows to align with the d… (#44)

Updated search for pub cache directory on windows to align with the dart documenation on where it is located. Logic falls back to original version of the pub cache can't be found at the expected version. The dart doco says the location can vary on different windows version and I suspect that fact is the source of this problem.
2 files changed
tree: ba23800457b21a80492fe365fe7efaf3f2d6c978
  1. .github/
  2. example/
  3. lib/
  4. test/
  5. tool/
  6. .gitignore
  7. .project
  8. analysis_options.yaml
  9. appveyor.yml
  11. CHANGELOG.md
  14. pubspec.yaml
  15. README.md


A library to reflect on the local pub cache.

pub package Build Status

How do I use it?

pub_cache lets you reflect on the information in your Pub cache. For example, to find all the applications that have been activated:

PubCache cache = new PubCache();

for (Application app in cache.getGlobalApplications()) {
  print('activated app: ${app.name}, version: ${app.version}');

Some other interesting use cases:

  • finding all the activated applications whose defining package has a specific meta-data file
  • given a package name, locate the directory on disk for that package, and using that location to read resources contained in the package
  • finding the latest non-dev version of all the packages in the cache

Features and bugs

Please file feature requests and bugs at the issue tracker.