how to fetch relative path of a file item/ versionable?
2 answers
Maybe check this: http://thescmlounge.blogspot.com/2013/08/getting-your-stuff-using-rtc-sdk-to-zip.html
And please use reasonable tagging. This is rational team concert extending and noting else.
You can use:
IScmService.configurationLocateAncestors(...)
or
IScmService.configurationDetermineAncestorsInHistory(...) (this will give you the path of a file even if it was recently deleted in the stream - it goes through the change set history to try to find the path where the file used to be).
Comments
i have only iversionable and ifileitem as inputs, how to fetch in that case.
You will not be able to retrieve a path given a versionable on its own. A file has a pointer to the parent folder (where the pointer is just an itemId or handle), but the name of that parent folder (along with the full path right up to the component root) can only be determined with a context (stream/workspace/baseline).
For example, 'fileA.txt' may be located at '/dirA/dirA2/fileA.txt' in StreamA, and '/dirB/dirB2/dirB3/fileA.txt' in StreamB.