dsglob.js 333 B

1234567891011121314
  1. "use strict";
  2. var minimatch = require('minimatch');
  3. var zfs = require('./zfs');
  4. module.exports = function (glob, cb) {
  5. zfs.list(['-t', 'filesystem,volume'], function (err, datasets) {
  6. if (err)
  7. return cb(err);
  8. var found = datasets.filter(minimatch.filter(glob));
  9. cb(null, found);
  10. });
  11. };