我在Sharepoint 2010上,我想检查文件集中是否存在文件,我该怎么做(如果可能,使用CAML)?
提前致谢!
答案 0 :(得分:1)
Isha Attlee的帖子应该可以满足您的需求:
http://mysharepointwork.blogspot.com/2010/09/programmatically-get-document-set-for.html
摘录如下:
public bool IsDocumentSetItem(SPListItem itemToCheck)
{
bool documentSetItem = false;
if (itemToCheck.File != null)
{
DocumentSet documentSet;
documentSet = DocumentSet.GetDocumentSet(itemToCheck.File.ParentFolder);
if (null != documentSet)
{
documentSetItem = true;
}
}
return documentSetItem;
}