SPWeb.Files Property

Gets the collection of all files in the root directory of the website.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online

public SPFileCollection Files { get; }

Property Value

Type: Microsoft.SharePoint.SPFileCollection
An SPFileCollection object that represents the files.

The user must have the Browse Directories right to run code that uses the Files property.