Question Ranjith Narasimha · Jun 15, 2017

cache program to compare two files

How can i compare two files using cache program, i need this for unit testing purpose 

Comments

John Murray  Jun 15, 2017 to Ranjith Narasimha

Vitaliy's answer pointed you to a classmethod that does the job. Sounds like maybe you're not sure how to invoke classmethods in Caché ObjectScript, so here's a transcript from a quick test run I did in Terminal:

USER>set bSame=##class(%Library.File).Compare("c:\s\junk.txt","c:\s\junk2.txt")
 
USER>write bSame
0
USER>set bSame=##class(%Library.File).Compare("c:\s\junk.txt","c:\s\junk.txt")
 
USER>write bSame
1
USER>w $zv
Cache for Windows (x86-64) 2017.1.1 (Build 111U) Wed May 17 2017 15:34:56 EDT
USER>

If Vitaliy's answer meets your needs please set the checkmark alonngside its title line.

0
John Murray  Jun 16, 2017 to Ranjith Narasimha

That's good to hear Ranjith. So now please set the checkmark against Vitaliy's original answer. Only you are able to do this. It will mark the question as "answered".

0