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
HttpWebRequestThe 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
HttpWebRequestThe web request.
name
stringThe metadata name.
value
stringThe 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
UriThe absolute URI to the directory.
timeout
int?The server timeout interval.
useVersionHeader
boolA boolean value indicating whether to set the x-ms-version HTTP header.
operationContext
OperationContextAn 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
UriThe absolute URI to the directory.
timeout
int?The server timeout interval.
accessCondition
AccessConditionThe access condition to apply to the request.
useVersionHeader
boolA boolean value indicating whether to set the x-ms-version HTTP header.
operationContext
OperationContextAn 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
UriThe absolute URI to the directory.
timeout
int?The server timeout interval.
accessCondition
AccessConditionThe access condition to apply to the request.
useVersionHeader
boolA boolean value indicating whether to set the x-ms-version HTTP header.
operationContext
OperationContextAn 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
UriThe 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
AccessConditionThe access condition to apply to the request.
useVersionHeader
boolA flag indicating whether to set the x-ms-version HTTP header.
operationContext
OperationContextAn 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
UriThe absolute URI to the directory.
timeout
int?The server timeout interval.
accessCondition
AccessConditionThe access condition to apply to the request.
useVersionHeader
boolA boolean value indicating whether to set the x-ms-version HTTP header.
operationContext
OperationContextAn 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
UriThe 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
AccessConditionThe access condition to apply to the request.
useVersionHeader
boolA flag indicating whether to set the x-ms-version HTTP header.
operationContext
OperationContextAn 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
UriThe absolute URI to the share.
timeout
int?The server timeout interval.
listingContext
FileListingContextA set of parameters for the listing operation.
useVersionHeader
boolA boolean value indicating whether to set the x-ms-version HTTP header.
operationContext
OperationContextAn 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
UriThe absolute URI to the share.
timeout
int?The server timeout interval.
listingContext
FileListingContextA set of parameters for the listing operation.
shareSnapshot
DateTimeOffset?A DateTimeOffset specifying the share snapshot timestamp, if the share is a snapshot.
useVersionHeader
boolA flag indicating whether to set the x-ms-version HTTP header.
operationContext
OperationContextAn 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
UriA System.Uri specifying the absolute URI to the destination blob.
timeout
int?An integer specifying the server timeout interval.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed.
useVersionHeader
boolA boolean value indicating whether to set the x-ms-version HTTP header.
operationContext
OperationContextAn OperationContext object for tracking the current operation.
Returns
- HttpWebRequest
A web request for performing the operation.