how to fetch relative path of a file item/ versionable?
akshay p (15●1●19)
| asked Feb 21 '19, 12:25 a.m.
edited Feb 21 '19, 6:40 a.m. by Ralph Schoon (63.5k●3●36●46) how to fetch relative path of a file item/ versionable? |
2 answers
Ralph Schoon (63.5k●3●36●46)
| answered Feb 21 '19, 6:40 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER 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
akshay p
commented Feb 26 '19, 6:19 a.m.
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. |
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.