on 12-19-2006 7:52 AM
Hi guys,
how can I get the file name XXX under the folder YYY, which has RID for example
1bczuzrejekwlt? Can I get this file like this way:
1bczuzrejekwlt/XXX
or
I have to change the RID 1bczuzrejekwlt to normal folder name /../YYY, and then concatenate /.../YYY/XXX.
Is there any documents to describe details?
thanks in advance!
Regards,
Liying
Hi Liying
As far as what i understood from ur doubt is that, u have the RID of the folder YYY.
If u want to get the RID of the resource XXX directly u can use, /documents/YYY/XXX.extension directly.
Like for eg,
<b>RID pathRID =
RID.getRID("/documents/Setup Files/"fileName".txt");
IResource resource = (IResource) resourseFactory.getResource(pathRID,resourseContext);</b>
Now u can use <b>resource.getContent()</b> to get the contents of file.
Award points if found usefull,
BP.
Message was edited by:
BP
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Liying,
RID pathRID = RID.getRID("/documents/folderPath");
ICollection collection =(ICollection) resourseFactory.getResource(
pathRID,
resourseContext);
IResourceList resourceList = collection.getChildren();
IResourceListIterator resourceListIterator =
resourceList.listIterator();
while (resourceListIterator.hasNext()) {
IResource resource = resourceListIterator.next();
//do some action here//
//u can check whether the resource is a folder by using
//if(resource.isCollection()); here//
}
Award points if found usefull
BP
I'm not sure I understand the question.
Is it about the relation of names, as displayed by the UI, and RIDs?
Parts of the UI use the "displayname" property rather than the RID when available. But that doesn't affect access through RIDs at all.
Best regards, Julian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.