rootslab/formaline — pull request #26 by AtliThor (2011-10-21 03:47:25+00:00)
Title: Windows compatibility fixes.

A few updates aimed at making this work with the current Windows build (v0.5.9).

The hard-coded "/tmp/" paths have been replaced by the Windows "TEMP" variable when available; the "/" dir separators are replaced by "\\" when the os.type() matches "/windows/i", and the "fs.watchFile" call is removed.

I've tested this without any issues on both Windows 7, 64 bit with Node.js v0.5.9; and Ubuntu 11.04, 32 bit w/ Node.js v0.4.12.

By the way...
Correct me if I'm wrong, but isn't the "fs.watchFile" call redundant? The only thing that changes the file being watched is a call to the writeToFileStream function with a payload to be written, and such a call already sets the mtime.