I have a file name myfile.txt
in my desktop and I want to:
- check whether this same file name is present or not in my ClearCase vob and
- if present, then I want to read the file data without checking it out.
I want to write a script for that in c#.
I am using Clearcase Automation Library (CAL) in Visual Studio.
Note: CAL (ClearCase Automation Library) might not be available for the latest versions of ClearCase (8.x): it is for CC7.1.2 or less.
Since you can execute cleartool command with it, your best approach is to first check if you can get the data you want through cleartool script, and then reporting that script in a CAL script:
For reading data of any version without any checkout, you need to search in a dynamic view, where you can read any extended pathname (see "About the version-extended path").
For finding your file, you need a
cleartool find
command, with the option-nvi/sible
:Then you need to cat the %CLEARCASE_XPN% result