Skip to content

Commit 66e61c1

Browse files
Edits
1 parent 2a7dd2b commit 66e61c1

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

articles/storage/files/storage-dotnet-how-to-use-files.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,15 @@ ShareFileClient destShareFileClient = new(
435435
await destShareFileClient.StartCopyAsync(srcShareFileClient.Uri);
436436
```
437437
438+
## Lease a file using the File Shares client library
439+
440+
A lease creates a lock on a file that's managed by Azure via a lease ID. The lease provides a mechanism to coordinate access to files across multiple clients in a distributed system. A lease on a file provides exclusive write and delete access. To learn more about lease duration and actions, see [Lease File](/rest/api/storageservices/lease-file).
441+
442+
The following code example shows how to acquire a lease on a file:
443+
444+
```csharp
445+
```
446+
438447
## Manage Azure Files resources using the Azure Storage management libraries
439448
440449
The Azure Storage management libraries are built on the Azure Storage resource provider REST API. The Azure Storage resource provider is a service based on [Azure Resource Manager](/azure/azure-resource-manager/management/overview), and supports both declarative (templates) and imperative (direct API call) methods. The Azure Storage resource provider REST API provides programmatic access to Azure Storage resources, including file shares. The Azure SDK provides management libraries that build on the Azure Storage resource provider REST API.

0 commit comments

Comments
 (0)