Within SharePoint users can update files.
Does SPFolder.Files return the latest version of the files like the SharePoint UI would, or version 1.0 of each file?
SPSite oSiteCollection = SPContext.Current.Site;
SPWebCollection collWebsites = oSiteCollection.AllWebs;
foreach (SPWeb oWebsite in collWebsites)
{
S开发者_如何学运维PFolderCollection collFolders = oWebsite.Folders;
foreach (SPFolder oFolder in collFolders)
{
SPFileCollection collFiles = oFolder.Files;
The SPFile gives access to all stored version
Directly from the SPFile you the latest version like the UI.
If you need the old versions you have to go through the Versions property.
精彩评论