Is it possible to get the previous name of a renamed file, using fs.watch in NodeJS? For example:
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?");
});
Only on Windows and Linux. On OS X the kernel doesn't support the necessary functionality to send back the filename to your callback.
Oh, I misunderstood the question. You don't want to see the new name. You want to get the old name.
The API doesn't support that at the moment that I know of.