tags:

views:

9

answers:

1

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)
{
    SPFolderCollection collFolders = oWebsite.Folders;

    foreach (SPFolder oFolder in collFolders)
    {
        SPFileCollection collFiles = oFolder.Files;
A: 

Hi OrdinaryDeveloper

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.

Per Jakobsen