mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-20 18:18:56 +00:00
feature(pipe) pipe.create -> pipe
This commit is contained in:
parent
d4dfdba158
commit
9b9e50efd1
7 changed files with 15 additions and 14 deletions
|
|
@ -62,7 +62,7 @@
|
|||
} else {
|
||||
name = names.shift();
|
||||
|
||||
pipe.create(name, write, options, function(error) {
|
||||
pipe(name, write, options, function(error) {
|
||||
if (error)
|
||||
callback(error);
|
||||
else
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@
|
|||
stopOnError: true
|
||||
}, callback);
|
||||
else
|
||||
pipe.create(from, to, callback);
|
||||
pipe(from, to, callback);
|
||||
});
|
||||
};
|
||||
})();
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
};
|
||||
|
||||
if (!is || !fstream || !tar)
|
||||
pipe.create(from, to, options, callback);
|
||||
pipe(from, to, options, callback);
|
||||
else
|
||||
createTar(from, function(readStream) {
|
||||
var dir, name,
|
||||
|
|
@ -34,7 +34,7 @@
|
|||
to = dir + path.sep + name + '.tar.gz';
|
||||
}
|
||||
|
||||
pipe.create(readStream, to, options, callback);
|
||||
pipe(readStream, to, options, callback);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
|
@ -55,7 +55,7 @@
|
|||
write = to;
|
||||
}
|
||||
|
||||
pipe.create(from, write, options, callback);
|
||||
pipe(from, write, options, callback);
|
||||
};
|
||||
|
||||
function createTar(from, callback) {
|
||||
|
|
|
|||
|
|
@ -1,13 +1,14 @@
|
|||
(function () {
|
||||
'use strict';
|
||||
|
||||
var Util = require('../util'),
|
||||
type = Util.type,
|
||||
fs = require('fs'),
|
||||
zlib = require('zlib');
|
||||
var fs = require('fs'),
|
||||
zlib = require('zlib'),
|
||||
|
||||
Util = require('../util'),
|
||||
type = Util.type;
|
||||
|
||||
exports.create = create;
|
||||
exports.getBody = getBody;
|
||||
module.exports = create;
|
||||
module.exports.getBody = getBody;
|
||||
|
||||
/**
|
||||
* create pipe
|
||||
|
|
|
|||
|
|
@ -227,7 +227,7 @@
|
|||
range : range
|
||||
};
|
||||
|
||||
pipe.create(p.name, p.response, options, function(error) {
|
||||
pipe(p.name, p.response, options, function(error) {
|
||||
if (error)
|
||||
sendError(error, params);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@
|
|||
error = 'hash: not suported, try update node';
|
||||
callback(Error(error));
|
||||
} else
|
||||
pipe.create(name, hashStream, function (error) {
|
||||
pipe(name, hashStream, function (error) {
|
||||
var hex;
|
||||
|
||||
if (!error)
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
switch(query) {
|
||||
default:
|
||||
pipe.create(readStream, name, onSave);
|
||||
pipe(readStream, name, onSave);
|
||||
break;
|
||||
|
||||
case 'dir':
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue