Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Configure and optimize Azure Storage accounts, Blob, Queue, Table, and File services
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
references/sdk/azure-storage-file-share-ts.md
1# File Shares — TypeScript SDK Quick Reference23> Condensed from **azure-storage-file-share-ts**. Full patterns (SAS generation,4> snapshots, range operations, streaming, copy operations)5> in the **azure-storage-file-share-ts** plugin skill if installed.67## Install8npm install @azure/storage-file-share @azure/identity910## Quick Start11```typescript12import { ShareServiceClient } from "@azure/storage-file-share";13import { DefaultAzureCredential } from "@azure/identity";14const client = new ShareServiceClient(`https://${accountName}.file.core.windows.net`, new DefaultAzureCredential());15```1617## Best Practices18- Use connection strings for simplicity in development19- Use DefaultAzureCredential for **local development only** — in production, use ManagedIdentityCredential. See [auth-best-practices.md](../auth-best-practices.md)20- Set quotas on shares to prevent unexpected storage costs21- Use streaming for large files — `uploadStream`/`downloadToFile` for files > 256MB22- Use ranges for partial updates — more efficient than full file replacement23- Create snapshots before major changes — point-in-time recovery24- Handle errors gracefully — check `RestError.statusCode` for specific handling25- Use `*IfExists` methods for idempotent operations26