API for doesFolderExists

I was looking for APIs on how to handle folders. I did found API to create new folders, and add items. But I was not able to figure out if there is an API that checks if for the given path and the given name, is there a folder.

My requirement is to create a new folder if the folder does not exists and add items to it.
And if the folder already exists, then simply add items to it.

manvinder

You can use IPSContentWs.loadFolders(). This will load the folder if it exists and give you an error if it does not. If you catch the exception, you can then create the folder.

Thanks Daveā€¦Also after we detect that the folder does exits, is there any API method to get the folder Id from the returned list of folders?