Table of Contents

Class DirectoryHttpWebRequestFactory

Namespace
Microsoft.WindowsAzure.Storage.File.Protocol
Assembly
Microsoft.WindowsAzure.Storage.dll

A factory class for constructing web requests for operations on directories in the File service.

public static class DirectoryHttpWebRequestFactory
Inheritance
DirectoryHttpWebRequestFactory
Inherited Members

Methods

AddMetadata(HttpWebRequest, IDictionary<string, string>)

Adds user-defined metadata to the request as one or more name-value pairs.

public static void AddMetadata(HttpWebRequest request, IDictionary<string, string> metadata)

Parameters

request HttpWebRequest

The web request.

metadata IDictionary<string, string>

The user-defined metadata.

AddMetadata(HttpWebRequest, string, string)

Adds user-defined metadata to the request as a single name-value pair.

public static void AddMetadata(HttpWebRequest request, string name, string value)

Parameters

request HttpWebRequest

The web request.

name string

The metadata name.

value string

The metadata value.

Create(Uri, int?, bool, OperationContext)

Constructs a web request to create a new directory.

public static HttpWebRequest Create(Uri uri, int? timeout, bool useVersionHeader, OperationContext operationContext)

Parameters

uri Uri

The absolute URI to the directory.

timeout int?

The server timeout interval.

useVersionHeader bool

A boolean value indicating whether to set the x-ms-version HTTP header.

operationContext OperationContext

An OperationContext object for tracking the current operation.

Returns

HttpWebRequest

A web request to use to perform the operation.

Delete(Uri, int?, AccessCondition, bool, OperationContext)

Constructs a web request to delete the directory and all of the files within it.

public static HttpWebRequest Delete(Uri uri, int? timeout, AccessCondition accessCondition, bool useVersionHeader, OperationContext operationContext)

Parameters

uri Uri

The absolute URI to the directory.

timeout int?

The server timeout interval.

accessCondition AccessCondition

The access condition to apply to the request.

useVersionHeader bool

A boolean value indicating whether to set the x-ms-version HTTP header.

operationContext OperationContext

An OperationContext object for tracking the current operation.

Returns

HttpWebRequest

A HttpWebRequest object.

GetMetadata(Uri, int?, AccessCondition, bool, OperationContext)

Generates a web request to return the user-defined metadata for this directory.

public static HttpWebRequest GetMetadata(Uri uri, int? timeout, AccessCondition accessCondition, bool useVersionHeader, OperationContext operationContext)

Parameters

uri Uri

The absolute URI to the directory.

timeout int?

The server timeout interval.

accessCondition AccessCondition

The access condition to apply to the request.

useVersionHeader bool

A boolean value indicating whether to set the x-ms-version HTTP header.

operationContext OperationContext

An OperationContext object for tracking the current operation.

Returns

HttpWebRequest

A HttpWebRequest object.

GetMetadata(Uri, int?, DateTimeOffset?, AccessCondition, bool, OperationContext)

Generates a web request to return the user-defined metadata for this directory.

public static HttpWebRequest GetMetadata(Uri uri, int? timeout, DateTimeOffset? shareSnapshot, AccessCondition accessCondition, bool useVersionHeader, OperationContext operationContext)

Parameters

uri Uri

The absolute URI to the directory.

timeout int?

The server timeout interval.

shareSnapshot DateTimeOffset?

A DateTimeOffset specifying the share snapshot timestamp, if the share is a snapshot.

accessCondition AccessCondition

The access condition to apply to the request.

useVersionHeader bool

A flag indicating whether to set the x-ms-version HTTP header.

operationContext OperationContext

An OperationContext object for tracking the current operation.

Returns

HttpWebRequest

A web request to use to perform the operation.

GetProperties(Uri, int?, AccessCondition, bool, OperationContext)

Generates a web request to return the properties and user-defined metadata for this directory.

public static HttpWebRequest GetProperties(Uri uri, int? timeout, AccessCondition accessCondition, bool useVersionHeader, OperationContext operationContext)

Parameters

uri Uri

The absolute URI to the directory.

timeout int?

The server timeout interval.

accessCondition AccessCondition

The access condition to apply to the request.

useVersionHeader bool

A boolean value indicating whether to set the x-ms-version HTTP header.

operationContext OperationContext

An OperationContext object for tracking the current operation.

Returns

HttpWebRequest

A HttpWebRequest object.

GetProperties(Uri, int?, DateTimeOffset?, AccessCondition, bool, OperationContext)

Generates a web request to return the properties and user-defined metadata for this directory.

public static HttpWebRequest GetProperties(Uri uri, int? timeout, DateTimeOffset? shareSnapshot, AccessCondition accessCondition, bool useVersionHeader, OperationContext operationContext)

Parameters

uri Uri

The absolute URI to the directory.

timeout int?

The server timeout interval.

shareSnapshot DateTimeOffset?

A DateTimeOffset specifying the share snapshot timestamp, if the share is a snapshot.

accessCondition AccessCondition

The access condition to apply to the request.

useVersionHeader bool

A flag indicating whether to set the x-ms-version HTTP header.

operationContext OperationContext

An OperationContext object for tracking the current operation.

Returns

HttpWebRequest

A web request to use to perform the operation.

List(Uri, int?, FileListingContext, bool, OperationContext)

Generates a web request to return a listing of all files and subdirectories in the directory.

public static HttpWebRequest List(Uri uri, int? timeout, FileListingContext listingContext, bool useVersionHeader, OperationContext operationContext)

Parameters

uri Uri

The absolute URI to the share.

timeout int?

The server timeout interval.

listingContext FileListingContext

A set of parameters for the listing operation.

useVersionHeader bool

A boolean value indicating whether to set the x-ms-version HTTP header.

operationContext OperationContext

An OperationContext object for tracking the current operation.

Returns

HttpWebRequest

A HttpWebRequest object.

List(Uri, int?, FileListingContext, DateTimeOffset?, bool, OperationContext)

Generates a web request to return a listing of all files and subdirectories in the directory.

public static HttpWebRequest List(Uri uri, int? timeout, FileListingContext listingContext, DateTimeOffset? shareSnapshot, bool useVersionHeader, OperationContext operationContext)

Parameters

uri Uri

The absolute URI to the share.

timeout int?

The server timeout interval.

listingContext FileListingContext

A set of parameters for the listing operation.

shareSnapshot DateTimeOffset?

A DateTimeOffset specifying the share snapshot timestamp, if the share is a snapshot.

useVersionHeader bool

A flag indicating whether to set the x-ms-version HTTP header.

operationContext OperationContext

An OperationContext object for tracking the current operation.

Returns

HttpWebRequest

A web request to use to perform the operation.

SetMetadata(Uri, int?, AccessCondition, bool, OperationContext)

Constructs a web request to set user-defined metadata for the directory.

public static HttpWebRequest SetMetadata(Uri uri, int? timeout, AccessCondition accessCondition, bool useVersionHeader, OperationContext operationContext)

Parameters

uri Uri

A System.Uri specifying the absolute URI to the destination blob.

timeout int?

An integer specifying the server timeout interval.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

useVersionHeader bool

A boolean value indicating whether to set the x-ms-version HTTP header.

operationContext OperationContext

An OperationContext object for tracking the current operation.

Returns

HttpWebRequest

A web request for performing the operation.