AnsweredAssumed Answered

CMIS count folder and document

Question asked by sintextsrl on Jun 22, 2016
Latest reply on Jun 22, 2016 by angelborroy
Hi,

I want know a number of the documents and file in a root folder. I do a simple query and retrieve a property getTotalNumItems of ItemIterable<QueryResult> query. I think that this solution is no better solution to count a item of specific root folder. My code is:

         String query = "SELECT * FROM cmis:document D WHERE IN_TREE (D, '"+workSpace+"') ";
         
         ItemIterable<QueryResult> q = session.query(query, false);
         
          q.getTotalNumItems();
Is there another mode to retrieve a number of item of root folder from CMIS protocol?

thanks a lot.


Outcomes