You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/storage/files/storage-dotnet-how-to-use-files.md
+21Lines changed: 21 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -461,6 +461,27 @@ You can configure the file share properties using the [FileShareData](/dotnet/ap
461
461
>[!NOTE]
462
462
> To perform the register operation, you need permissions for the following Azure RBAC action: Microsoft.Storage/register/action. This permission is included in the Contributor and Owner built-in roles.
463
463
464
+
### Example: List file shares and snapshots using the Azure Storage management library
465
+
466
+
The following code example shows how to list file shares and snapshots in a storage account:
467
+
468
+
```csharp
469
+
// Iterate over a collection of file shares and list them along with any snapshots
470
+
string expand = "snapshots";
471
+
await foreach (FileShareResource shareResource in fileService.GetFileShares().GetAllAsync(expand: expand))
472
+
{
473
+
// Call operations on the file share resource
474
+
475
+
// For this demo, print out the resource name and snapshot information
0 commit comments