cancel
Showing results for 
Search instead for 
Did you mean: 

How find out type of resource (folder/doc) ...

Former Member
0 Kudos

Hi all!

I need to classify KM resourses in a taxonomy and I don't know how can I find out type of the resourses (whether the resourse is folder or document). Is the type stored in any indexable property?

Thanks in advance for any idea!

Regards

Zbynek

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi there,

IResource resource = ...;

I think you can check the <i>resource</i> object you have is an <b>instanceof</b> <i>ICollection</i> or not.. like..

if(resource <b>instanceof</b> ICollection){
....
..
}

If Yes, it's a folder

If No, it's a file

or you can also try


if(resource.isCollection() ) {
ICollection collection = (ICollection)resource;
.....
}

How'z that?

Regards,

SK.

<i>PS: Plz rewards points if helpful!</i>

Former Member
0 Kudos

Hi

Unfortunally I found out that classification of folder is probably not possible. Everywhere I have read just about classification of documents. Does exist any way how to classify folders also?

Regards

Zbynek

Answers (0)