mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 18:55:26 +00:00
feature(fstream) rm
This commit is contained in:
parent
8c5e79496d
commit
d4dfdba158
1 changed files with 0 additions and 28 deletions
|
|
@ -1,28 +0,0 @@
|
|||
(function () {
|
||||
'use strict';
|
||||
|
||||
var DIR = './',
|
||||
|
||||
tryRequire = require(DIR + 'tryRequire'),
|
||||
|
||||
fstream = tryRequire('fstream'),
|
||||
tar = tryRequire('tar');
|
||||
|
||||
exports.pack = function (path) {
|
||||
var dirStream, tarStream;
|
||||
|
||||
if (tar && fstream) {
|
||||
dirStream = fstream.Reader({
|
||||
type: 'Directory',
|
||||
path: path
|
||||
});
|
||||
|
||||
tarStream = tar.Pack({});
|
||||
|
||||
dirStream = dirStream.pipe(tarStream);
|
||||
}
|
||||
|
||||
return dirStream;
|
||||
};
|
||||
|
||||
})();
|
||||
Loading…
Add table
Add a link
Reference in a new issue