开发者

Does SPFolder.Files return the latest version of files?

开发者 https://www.devze.com 2023-01-07 02:02 出处:网络
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?

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消