是否可以在 NodeJS 中使用 fs.watch 获取重命名文件的先前名称?例如:
var fs = require("fs");
fs.watch("some_file",function(action,filename){
if (action == "rename" && filename)
console.log("what was the old filename, before the rename action?");
});
是否可以在 NodeJS 中使用 fs.watch 获取重命名文件的先前名称?例如:
var fs = require("fs");
fs.watch("some_file",function(action,filename){
if (action == "rename" && filename)
console.log("what was the old filename, before the rename action?");
});