开发者

Does SPFolder.Files return the latest version of files?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜