Phobos function to check if files are identical?

XavierAP via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Mar 13 09:50:49 PDT 2017


It's not easy to do by hand of course, but I was wondering if 
there was one simple function taking two file names and just 
returning a bool or something like that. I haven't found it in 
std.file.

If such a function doesn't exist in Phobos but there's a good 
implementation in some other library, I'm interested to know. 
Although this time it's for a unit test so I'd rather implement 
it in two lines than add a dependency.

And otherwise to write it by hand, how do you think is the best 
way? And in terms of performance? By chunks in case of a binary 
comparison? And what about the case of a text comparison?

Thanks


More information about the Digitalmars-d-learn mailing list