2010-07-15 66 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。

如果您需要舊版本,您必須通過版本屬性。

相關問題