var filePath = 'E:/PHPnow-1.5.6/htdocs/dp/web/**';
gulp.src(filePath, {read: false})
.pipe(gulp.dest('../_backups'));
问题是filePath匹配到的文件写入到_backups文件夹后发现全是空文件夹,没有具体文件。
改了filePath的写法比如"E:/PHPnow-1.5.6/htdocs/dp/web//","E:/PHPnow-1.5.6/htdocs/dp/web//.*"等等都不起作用,本人入门,望有大神解答
文件结构是这样的:
应该是这样吧!
var filePath = 'E:/PHPnow-1.5.6/htdocs/dp/web/**/*';
gulp.src(filePath, {read: false})
.pipe(gulp.dest('../_backups'));
没必要写死目录吧 根据当前目录 ../*/.*
var filePath = ['E:/PHPnow-1.5.6/htdocs/dp/web/*/.*'];
gulp.src(filePath, {read: false})
.pipe(gulp.dest('../_backups'));