I've got a CamlQuery
that traverses the /public/
folder and returns all files that match a certain criteria and it works gorgeously. Now I need it to do the same for a separate library but have the results returned in the same instance.
Code
private static SPListItemCollection retrieveDocs(SPWeb web, String meta)
{
SPQuery query = new SPQuery();
query.ViewXml = "<View Scope='Recursive'><Query><Where><Contains><FieldRef Name='Key_x0020_Topics'/><Value Type='SPFieldLookupMulti'>" + meta + "</Value></Contains></Where></Query></View>";
SPList docLib = web.Lists["public"];
SPListItemCollection files = docLib.GetItems(query);
return files;
}
Can I make my query traverse both the public
and secure
folder and then return the files as one Collection?