filer
filer copied to clipboard
Support glob patterns in shell commands
We only support glob patterns in sh.find()
. Let's add them to some other shell commands:
sh.ls(dir, [options], callback)
sh.cat(files, callback)
sh.rm(path, [options], callback)
These should support being passed a glob pattern, for example:
// List all .js files in src
sh.ls('/src/*.js', callback);
// Concatenate all .txt files in docs
sh.cat('/docs/*.txt', callback);
// Delete all .tmp files
sh.rm('/*.tmp', callback);
NOTE: might be good to do https://github.com/filerjs/filer/issues/598 first, but it's not critical.