diff --git a/run.n b/run.n index 8d875000..5f67b050 100644 Binary files a/run.n and b/run.n differ diff --git a/src/dox/Dox.hx b/src/dox/Dox.hx index 8e52f0ea..562ca54d 100644 --- a/src/dox/Dox.hx +++ b/src/dox/Dox.hx @@ -138,7 +138,25 @@ class Dox { function parseFile(path) { var name = new Path(path).file; Sys.println('Parsing $path'); + + var hashPaths = cfg.outputPath + "/hashes/"; + + if (!FileSystem.exists(hashPaths)) + FileSystem.createDirectory(hashPaths); + var data = sys.io.File.getContent(path); + var md5Hash = haxe.crypto.Md5.encode(data); + + if (sys.FileSystem.exists(hashPaths + name + ".md5")) { + var previousHash = sys.io.File.getContent(hashPaths + name + ".md5"); + if (md5Hash == previousHash) { + Sys.println('Skipping $path, no file changes detected'); + return; + } + } + + sys.io.File.saveContent(hashPaths + name + ".md5", md5Hash); + var xml = try Xml.parse(data).firstElement() catch (err:Dynamic) { trace('Error while parsing $path'); throw err;