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.
|
2 answers
Ralph Schoon (63.3k●3●36●46)
| answered Oct 19 '17, 3:10 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Consider to check
to understand the relative path information available in the SCM context.
Comments
Michael Ron
commented Oct 19 '17, 3:22 a.m.
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.
Geoffrey Clemm
commented Oct 19 '17, 3:50 a.m.
| edited Oct 19 '17, 4:39 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
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.
Ralph Schoon
commented Oct 19 '17, 3:57 a.m.
| edited Oct 19 '17, 4:58 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
As an example the remote path is
Michael Ron
commented Oct 19 '17, 5:53 a.m.
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.
Michael Ron
commented Oct 19 '17, 8:32 a.m.
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
|
If you have the shareable, you can get the local path:
ILocation fullpath = shareable.getFullPath();
do you need the "remote path" ?
Comments
Michael Ron
commented Oct 19 '17, 12:39 p.m.
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.
Michael Ron
commented Oct 19 '17, 12:41 p.m.
I'm still trying to get it, but without any hint it's really hard...
Steven Hovater
commented Oct 19 '17, 1:01 p.m.
I was under the impression that files were stored in blobs in the database..
Steve
Geoffrey Clemm
commented Oct 19 '17, 5:03 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
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.
Michael Ron
commented Oct 20 '17, 1:06 a.m.
Do you know what function in RTC Api can compute remote pathname of base of eg. workspace?
|
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.