Ask Learn
Preview
Please sign in to use this experience.
Sign inThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Represents a folder on a SharePoint Web site.
System.Object
Microsoft.SharePoint.Client.ClientObject
Microsoft.SharePoint.Client.Folder
Namespace: Microsoft.SharePoint.Client
Assembly: Microsoft.SharePoint.Client (in Microsoft.SharePoint.Client.dll)
'Declaration
Public Class Folder _
Inherits ClientObject
'Usage
Dim instance As Folder
public class Folder : ClientObject
The UniqueContentTypeOrder property is not included in the default scalar property set for this type.
This code example lists the folders on the current website.
using System;
using Microsoft.SharePoint.Client;
namespace Microsoft.SDK.SharePointFoundation.Samples
{
class FolderExample
{
static void Main()
{
string siteUrl = "http://MyServer/sites/MySiteCollection";
ClientContext clientContext = new ClientContext(siteUrl);
Web site = clientContext.Web;
FolderCollection collFolder = site.Folders;
clientContext.Load(collFolder);
clientContext.ExecuteQuery();
Console.WriteLine("The current site contains the following folders:\n\n");
foreach (Folder myFolder in collFolder)
Console.WriteLine(myFolder.Name);
}
}
}
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Please sign in to use this experience.
Sign in