Глоток. Копировать с FTP
Как я могу скачать файлы с FTP через gulp в локальный каталог? Код ниже не работает:(
var gulp = require('gulp'),
ftp = require('vinyl-ftp');
gulp.task('FtpBackup', () => {
var conn = ftp.create(ftpConnections['cloud'][0]);
gulp.src(conn.src('/wwwroot/Debug'))
.pipe(gulp.dest('BackUp/'))
});
Есть:
ftpConnections ['cloud'] [0] - объект с настройками соединения:
{
host: 'someHost',
port: 'somePort',
user: 'someUser',
password: 'somePass',
parallel: 10,
log: gutil.log
}
Лог глоток:
[13:58:07] CONN
[13:58:07] 'FtpBackup' errored after 32 ms
[13:58:07] Error: Invalid
glob argument: [object Object] at Gulp.src
(C:\Work\...\node_modules\vinyl-fs\lib\src\index.js:20:11) at Gulp.gulp.task
(C:\Work\...\gulpfile.js:190:10) at module.exports
(C:\Work\...\node_modules\orchestrator\lib\runTask.js:34:7) at gulp.Orchestrator._runTask
(C:\Work\...\node_modules\orchestrator\index.js:273:3) at Gulp.Orchestrator._runStep
(C:\Work\...\node_modules\orchestrator\index.js:214:10) at Gulp.Orchestrator.start
(C:\Work\...\node_modules\orchestrator\index.js:134:8) at C:\Users\snowil\AppData\Roaming\npm\node_modules\gulp-cli\lib\versioned\^3.7.0\index.js:46:20 at _combinedTickCallback (internal/process/next_tick.js:67:7) at process._tickCallback (internal/process/next_tick.js:98:9) at Function.Module.runMain (module.js:577:11) at startup (node.js:160:18) at node.js:456:3
[13:58:07] READY
[13:58:07] MLSD /wwwroot
[13:58:07] MLSD /wwwroot/DebugSurvey
[13:58:07] DISC