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

RTC Api - Remote Path of file

Hello, how can I Receive remote path of selected file using RTC Api? I have IShareable object and IFile also, but don't know how to receive remote path of it.

0 votes



2 answers

Permanent link

Consider to check

to understand the relative path information available in the SCM context.

0 votes

Comments

I'm searching remote path not relative. I was able to establish that such information is available in file property -> Jazz Source Control -> and there is remote path field, nevertheless I can't find way to get it from RTC Api.

Note that relative path is a computed value, that requires a "configuration" (stream, workspace, baseline, or snapshot) parameter, and so cannot be determined just from the file itself, and therefore only appears to be a property of the file ... it actually is a computation that requires the configuration parameter.

As an example the remote path is

/JKEBusinessData/src/com/jke/beans/AccountBean.java

It is composed of the relative path build by the relative folder information the SCM system stores. Suggestions

  1. Don't assume if it is shown in the properties that there must be a simple getter for it
  2. Consider looking into the links provided to you (e.g. the http://thescmlounge.blogspot.de/2013/08/getting-your-stuff-using-rtc-sdk-to-zip.html computes the relative path in the zip file based on this information


 

Hm... remote path looks like following: component/path/to/file, since relative path in my workarea is different, because of particular loadrule. I thought remote path should be available through some class or getter... I guess need to go through all component folders and check if such file exist there.. don't think that this is most elegant solution.

Maybe there is a mechanism to search for a file in the API? I am almost sure there is.
Or consider looking into the links I provided, these however assume the basic structure of Eclipse projects in SCM.

It really doesn't have sense, since I have IShare object which is linked with component which contain the file, and I'm able to get this componen but I'm not able to get remote path of this file in this component...

Never mind. Good luck with your automation then.

showing 5 of 7 show 2 more comments

Permanent link

 If you have the shareable, you can get the local path:

ILocation fullpath = shareable.getFullPath();

do you need the "remote path" ?

0 votes

Comments

Yes I need remote path, which represents how file is stored in server. Function getFullPath gives me absolute path to the file but from my workspace which is not what I need.

I'm still trying to get it, but without any hint it's really hard...

 I was under the impression that files were stored in blobs in the database.. 


Steve

 File (versions) are blobs in the database, but in the context of a given configuration (workspace, stream, baseline, snapshot), the RTC server can compute a remote pathname for that file wrt that configuration.

Do you know what function in RTC Api can compute remote pathname of base of eg. workspace?

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,938

Question asked: Oct 19 '17, 1:22 a.m.

Question was seen: 2,164 times

Last updated: Oct 20 '17, 1:06 a.m.

Confirmation Cancel Confirm