Error: EXDEV, Cross-device link
发布于 12 年前 作者 2008feixu 6767 次浏览 最后一次编辑是 8 年前

var fs = require(‘fs’), util = require(‘util’);

var is = fs.createReadStream(‘source_file’) var os = fs.createWriteStream(‘destination_file’);

util.pump(is, os, function() { fs.unlinkSync(‘source_file’); });

http://stackoverflow.com/questions/4568689/how-do-i-move-file-a-to-a-different-partition-in-node-js

回到顶部