Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

how to fetch relative path of a file item/ versionable?

how to fetch relative path of a file item/ versionable?

0 votes



2 answers

Permanent link

 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.

0 votes


Permanent link
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).

0 votes

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.

Your answer

Register or log in to post 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,942

Question asked: Feb 21 '19, 12:25 a.m.

Question was seen: 2,367 times

Last updated: Feb 26 '19, 9:06 a.m.

Confirmation Cancel Confirm