Home

How to check if a folder exists using CMIS API

You are here

2 posts / 0 new
Last post
How to check if a folder exists using CMIS API

HI,

I want to know if a folder exists in the repository but do not want to iterate through all the folders. I tried using session.GetObjectByPath method. If the folder exists in the path then it returns the ICMISObject, however if the folder does not exist then it throws an error and i have to then create the folder from the catch block. I was wondering if there was some way in which i give a path for e.g Repository/RefLibFolder/InfoTypeFolder/ContentTypeFolder then the method returns me a true or false stating that the above structure exists or not.

Regards,
Rita

Hi Rita, I dont think that

Hi Rita, I dont think that API is available.

and I think you are doing it correct way.Please check below Jeff Pott's example - "Get the Target Folder"

http://ecmarchitect.com/archives/2013/08/26/3528

Niketa Patel
Senior Alfresco Consultant
CIGNEX Datamatics

Blog:http://niketa-alfresco3.blogspot.in/

forums index