I have this code to create a folder,
Before creating it i would like to check if this folder doesn’t already exists!
$service = Zend_Gdata_Docs::AUTH_SERVICE_NAME;
$client = Zend_Gdata_AuthSub::getHttpClient($_SESSION['cal_token']);
$docs = new Zend_Gdata_Docs($client);
$docs->createFolder('My Folder');
I would like something like
if($docs->isFolder('My Folder')) {
//do something
}
A folder in Google Docs is identified by a category with scheme
http://schemas.google.com/g/2005#kindand termhttp://schemas.google.com/docs/2007#folder:You can check whether an entry is a folder by calling
getCategory()to list all of its categories and looking for a category like the one above.