Error: EXDEV, Cross-device link
发布于 2年前 作者 2008feixu 1916 次浏览

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

回到顶部