2010-07-15 69 views
1

在SharePoint用户可以更新文件。SPFolder.Files是否会返回最新版本的文件?

SPFolder.Files是否会返回最新版本的文件,如SharePoint UI会或每个文件的版本1.0?

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; 

回答

1

spfile中给出了从spfile中,你可以访问所有存储的版本

直接的最新版本,如UI。

如果您需要旧版本,您必须通过版本属性。

相关问题