cache program to compare two files

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

Vote up!
Vote down!

Rating: 0

Comments: 3 Views: 124

3 answers

Answer
Vote up!
Vote down!

Rating: 1

Answer
Vote up!
Vote down!

Rating: 0

Answer

how? ..you have any code snippet?

Vote up!
Vote down!

Rating: 0

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.

Vote up!
Vote down!

Rating: 2

thanks this helped me 

Vote up!
Vote down!

Rating: 0

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".

Vote up!
Vote down!

Rating: 0

Log in to answer