var requestOptions = new FileRequestOptions() { Timeout = TimeSpan.FromSeconds(30), ClientRequestId = Guid.NewGuid().ToString() }; // Example usage: var fileContents = await filesystemClient.ReadFileAsync( path: "myFolder/myFile.txt", requestOptions: requestOptions );
var requestOptions = new FileRequestOptions() { RetryPolicy = new ExponentialRetry( maxRetries: 5, delay: TimeSpan.FromSeconds(1), maxDelay: TimeSpan.FromSeconds(10), deltaBackoff: TimeSpan.FromSeconds(2) ) }; // Example usage: var fileContents = await filesystemClient.ReadFileAsync( path: "myFolder/myFile.txt", requestOptions: requestOptions );This specifies a retry policy that will retry the request up to 5 times with a delay of 1 second between retries, increasing exponentially up to a maximum delay of 10 seconds. Overall, the FileRequestOptions class allows for fine-tuned control over requests to files in Azure Data Lake.