[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6CS8FVF38G5KZGSKTMNBGGE":3,"skill-same:01M6CS8FVF38G5KZGSKTMNBGGE":60},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":31,"linkOnly":32,"markdownContent":33,"markdownBody":34,"frontMatter":35,"refName":38,"commitSha":39,"skillDirectory":40,"forksCount":41,"repositoryHtmlUrl":42,"repositoryHomepageUrl":42,"ownerHtmlUrl":43,"ownerBlogUrl":6,"ownerDescription":44,"updatedAt":45,"install":46,"resources":59},"01M6CS8FVF38G5KZGSKTMNBGGE","azure-storage-file-share-ts",null,"Azure File Share JavaScript\u002FTypeScript SDK (@azure\u002Fstorage-file-share) for SMB file share operations.","Sam-06060\u002Fjarvis-assistant","Sam-06060","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F208600848?v=4","01M6CRKT7C7FXD21V6HXF293S0","Samson Frank Ganta","01M6CRKTBEKYFD8YX5Z1GT99EE",6,"Apache-2.0","https:\u002F\u002Fgithub.com\u002FSam-06060\u002Fjarvis-assistant\u002Fblob\u002Fmain\u002Fmodules\u002Fagent_skills\u002Fawesome-skills\u002Fplaybooks\u002Fazure-storage-file-share-ts\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30],"storage","azure storage","azure","azure storage file share ts","share","file","typescript","sdk","javascript","smb","operations","community","2026-11-10 10:12:30",false,"---\nname: azure-storage-file-share-ts\ndescription: Azure File Share JavaScript\u002FTypeScript SDK (@azure\u002Fstorage-file-share) for SMB file share operations.\nrisk: unknown\nsource: community\ndate_added: '2026-02-27'\n---\n\n# @azure\u002Fstorage-file-share (TypeScript\u002FJavaScript)\n\nSDK for Azure File Share operations — SMB file shares, directories, and file operations.\n\n## Installation\n\n```bash\nnpm install @azure\u002Fstorage-file-share @azure\u002Fidentity\n```\n\n**Current Version**: 12.x  \n**Node.js**: >= 18.0.0\n\n## Environment Variables\n\n```bash\nAZURE_STORAGE_ACCOUNT_NAME=\u003Caccount-name>\nAZURE_STORAGE_ACCOUNT_KEY=\u003Caccount-key>\n# OR connection string\nAZURE_STORAGE_CONNECTION_STRING=DefaultEndpointsProtocol=https;AccountName=...\n```\n\n## Authentication\n\n### Connection String (Simplest)\n\n```typescript\nimport { ShareServiceClient } from \"@azure\u002Fstorage-file-share\";\n\nconst client = ShareServiceClient.fromConnectionString(\n  process.env.AZURE_STORAGE_CONNECTION_STRING!\n);\n```\n\n### StorageSharedKeyCredential (Node.js only)\n\n```typescript\nimport { ShareServiceClient, StorageSharedKeyCredential } from \"@azure\u002Fstorage-file-share\";\n\nconst accountName = process.env.AZURE_STORAGE_ACCOUNT_NAME!;\nconst accountKey = process.env.AZURE_STORAGE_ACCOUNT_KEY!;\n\nconst sharedKeyCredential = new StorageSharedKeyCredential(accountName, accountKey);\nconst client = new ShareServiceClient(\n  `https:\u002F\u002F${accountName}.file.core.windows.net`,\n  sharedKeyCredential\n);\n```\n\n### DefaultAzureCredential\n\n```typescript\nimport { ShareServiceClient } from \"@azure\u002Fstorage-file-share\";\nimport { DefaultAzureCredential } from \"@azure\u002Fidentity\";\n\nconst accountName = process.env.AZURE_STORAGE_ACCOUNT_NAME!;\nconst client = new ShareServiceClient(\n  `https:\u002F\u002F${accountName}.file.core.windows.net`,\n  new DefaultAzureCredential()\n);\n```\n\n### SAS Token\n\n```typescript\nimport { ShareServiceClient } from \"@azure\u002Fstorage-file-share\";\n\nconst accountName = process.env.AZURE_STORAGE_ACCOUNT_NAME!;\nconst sasToken = process.env.AZURE_STORAGE_SAS_TOKEN!;\n\nconst client = new ShareServiceClient(\n  `https:\u002F\u002F${accountName}.file.core.windows.net${sasToken}`\n);\n```\n\n## Client Hierarchy\n\n```\nShareServiceClient (account level)\n└── ShareClient (share level)\n    └── ShareDirectoryClient (directory level)\n        └── ShareFileClient (file level)\n```\n\n## Share Operations\n\n### Create Share\n\n```typescript\nconst shareClient = client.getShareClient(\"my-share\");\nawait shareClient.create();\n\n\u002F\u002F Create with quota (in GB)\nawait shareClient.create({ quota: 100 });\n```\n\n### List Shares\n\n```typescript\nfor await (const share of client.listShares()) {\n  console.log(share.name, share.properties.quota);\n}\n\n\u002F\u002F With prefix filter\nfor await (const share of client.listShares({ prefix: \"logs-\" })) {\n  console.log(share.name);\n}\n```\n\n### Delete Share\n\n```typescript\nawait shareClient.delete();\n\n\u002F\u002F Delete if exists\nawait shareClient.deleteIfExists();\n```\n\n### Get Share Properties\n\n```typescript\nconst properties = await shareClient.getProperties();\nconsole.log(\"Quota:\", properties.quota, \"GB\");\nconsole.log(\"Last Modified:\", properties.lastModified);\n```\n\n### Set Share Quota\n\n```typescript\nawait shareClient.setQuota(200); \u002F\u002F 200 GB\n```\n\n## Directory Operations\n\n### Create Directory\n\n```typescript\nconst directoryClient = shareClient.getDirectoryClient(\"my-directory\");\nawait directoryClient.create();\n\n\u002F\u002F Create nested directory\nconst nestedDir = shareClient.getDirectoryClient(\"parent\u002Fchild\u002Fgrandchild\");\nawait nestedDir.create();\n```\n\n### List Directories and Files\n\n```typescript\nconst directoryClient = shareClient.getDirectoryClient(\"my-directory\");\n\nfor await (const item of directoryClient.listFilesAndDirectories()) {\n  if (item.kind === \"directory\") {\n    console.log(`[DIR] ${item.name}`);\n  } else {\n    console.log(`[FILE] ${item.name} (${item.properties.contentLength} bytes)`);\n  }\n}\n```\n\n### Delete Directory\n\n```typescript\nawait directoryClient.delete();\n\n\u002F\u002F Delete if exists\nawait directoryClient.deleteIfExists();\n```\n\n### Check if Directory Exists\n\n```typescript\nconst exists = await directoryClient.exists();\nif (!exists) {\n  await directoryClient.create();\n}\n```\n\n## File Operations\n\n### Upload File (Simple)\n\n```typescript\nconst fileClient = shareClient\n  .getDirectoryClient(\"my-directory\")\n  .getFileClient(\"my-file.txt\");\n\n\u002F\u002F Upload string\nconst content = \"Hello, World!\";\nawait fileClient.create(content.length);\nawait fileClient.uploadRange(content, 0, content.length);\n```\n\n### Upload File (Node.js - from local file)\n\n```typescript\nimport * as fs from \"fs\";\nimport * as path from \"path\";\n\nconst fileClient = shareClient.rootDirectoryClient.getFileClient(\"uploaded.txt\");\nconst localFilePath = \"\u002Fpath\u002Fto\u002Flocal\u002Ffile.txt\";\nconst fileSize = fs.statSync(localFilePath).size;\n\nawait fileClient.create(fileSize);\nawait fileClient.uploadFile(localFilePath);\n```\n\n### Upload File (Buffer)\n\n```typescript\nconst buffer = Buffer.from(\"Hello, Azure Files!\");\nconst fileClient = shareClient.rootDirectoryClient.getFileClient(\"buffer-file.txt\");\n\nawait fileClient.create(buffer.length);\nawait fileClient.uploadRange(buffer, 0, buffer.length);\n```\n\n### Upload File (Stream)\n\n```typescript\nimport * as fs from \"fs\";\n\nconst fileClient = shareClient.rootDirectoryClient.getFileClient(\"streamed.txt\");\nconst readStream = fs.createReadStream(\"\u002Fpath\u002Fto\u002Flocal\u002Ffile.txt\");\nconst fileSize = fs.statSync(\"\u002Fpath\u002Fto\u002Flocal\u002Ffile.txt\").size;\n\nawait fileClient.create(fileSize);\nawait fileClient.uploadStream(readStream, fileSize, 4 * 1024 * 1024, 4); \u002F\u002F 4MB buffer, 4 concurrency\n```\n\n### Download File\n\n```typescript\nconst fileClient = shareClient\n  .getDirectoryClient(\"my-directory\")\n  .getFileClient(\"my-file.txt\");\n\nconst downloadResponse = await fileClient.download();\n\n\u002F\u002F Read as string\nconst chunks: Buffer[] = [];\nfor await (const chunk of downloadResponse.readableStreamBody!) {\n  chunks.push(Buffer.from(chunk));\n}\nconst content = Buffer.concat(chunks).toString(\"utf-8\");\n```\n\n### Download to File (Node.js)\n\n```typescript\nconst fileClient = shareClient.rootDirectoryClient.getFileClient(\"my-file.txt\");\nawait fileClient.downloadToFile(\"\u002Fpath\u002Fto\u002Flocal\u002Fdestination.txt\");\n```\n\n### Download to Buffer (Node.js)\n\n```typescript\nconst fileClient = shareClient.rootDirectoryClient.getFileClient(\"my-file.txt\");\nconst buffer = await fileClient.downloadToBuffer();\nconsole.log(buffer.toString());\n```\n\n### Delete File\n\n```typescript\nconst fileClient = shareClient.rootDirectoryClient.getFileClient(\"my-file.txt\");\nawait fileClient.delete();\n\n\u002F\u002F Delete if exists\nawait fileClient.deleteIfExists();\n```\n\n### Copy File\n\n```typescript\nconst sourceUrl = \"https:\u002F\u002Faccount.file.core.windows.net\u002Fshare\u002Fsource.txt\";\nconst destFileClient = shareClient.rootDirectoryClient.getFileClient(\"destination.txt\");\n\n\u002F\u002F Start copy operation\nconst copyPoller = await destFileClient.startCopyFromURL(sourceUrl);\nawait copyPoller.pollUntilDone();\n```\n\n## File Properties & Metadata\n\n### Get File Properties\n\n```typescript\nconst fileClient = shareClient.rootDirectoryClient.getFileClient(\"my-file.txt\");\nconst properties = await fileClient.getProperties();\n\nconsole.log(\"Content-Length:\", properties.contentLength);\nconsole.log(\"Content-Type:\", properties.contentType);\nconsole.log(\"Last Modified:\", properties.lastModified);\nconsole.log(\"ETag:\", properties.etag);\n```\n\n### Set Metadata\n\n```typescript\nawait fileClient.setMetadata({\n  author: \"John Doe\",\n  category: \"documents\",\n});\n```\n\n### Set HTTP Headers\n\n```typescript\nawait fileClient.setHttpHeaders({\n  fileContentType: \"text\u002Fplain\",\n  fileCacheControl: \"max-age=3600\",\n  fileContentDisposition: \"attachment; filename=download.txt\",\n});\n```\n\n## Range Operations\n\n### Upload Range\n\n```typescript\nconst data = Buffer.from(\"partial content\");\nawait fileClient.uploadRange(data, 100, data.length); \u002F\u002F Write at offset 100\n```\n\n### Download Range\n\n```typescript\nconst downloadResponse = await fileClient.download(100, 50); \u002F\u002F offset 100, length 50\n```\n\n### Clear Range\n\n```typescript\nawait fileClient.clearRange(0, 100); \u002F\u002F Clear first 100 bytes\n```\n\n## Snapshot Operations\n\n### Create Snapshot\n\n```typescript\nconst snapshotResponse = await shareClient.createSnapshot();\nconsole.log(\"Snapshot:\", snapshotResponse.snapshot);\n```\n\n### Access Snapshot\n\n```typescript\nconst snapshotShareClient = shareClient.withSnapshot(snapshotResponse.snapshot!);\nconst snapshotFileClient = snapshotShareClient.rootDirectoryClient.getFileClient(\"file.txt\");\nconst content = await snapshotFileClient.downloadToBuffer();\n```\n\n### Delete Snapshot\n\n```typescript\nawait shareClient.delete({ deleteSnapshots: \"include\" });\n```\n\n## SAS Token Generation (Node.js only)\n\n### Generate File SAS\n\n```typescript\nimport {\n  generateFileSASQueryParameters,\n  FileSASPermissions,\n  StorageSharedKeyCredential,\n} from \"@azure\u002Fstorage-file-share\";\n\nconst sharedKeyCredential = new StorageSharedKeyCredential(accountName, accountKey);\n\nconst sasToken = generateFileSASQueryParameters(\n  {\n    shareName: \"my-share\",\n    filePath: \"my-directory\u002Fmy-file.txt\",\n    permissions: FileSASPermissions.parse(\"r\"), \u002F\u002F read only\n    expiresOn: new Date(Date.now() + 3600 * 1000), \u002F\u002F 1 hour\n  },\n  sharedKeyCredential\n).toString();\n\nconst sasUrl = `https:\u002F\u002F${accountName}.file.core.windows.net\u002Fmy-share\u002Fmy-directory\u002Fmy-file.txt?${sasToken}`;\n```\n\n### Generate Share SAS\n\n```typescript\nimport { ShareSASPermissions, generateFileSASQueryParameters } from \"@azure\u002Fstorage-file-share\";\n\nconst sasToken = generateFileSASQueryParameters(\n  {\n    shareName: \"my-share\",\n    permissions: ShareSASPermissions.parse(\"rcwdl\"), \u002F\u002F read, create, write, delete, list\n    expiresOn: new Date(Date.now() + 24 * 3600 * 1000), \u002F\u002F 24 hours\n  },\n  sharedKeyCredential\n).toString();\n```\n\n## Error Handling\n\n```typescript\nimport { RestError } from \"@azure\u002Fstorage-file-share\";\n\ntry {\n  await shareClient.create();\n} catch (error) {\n  if (error instanceof RestError) {\n    switch (error.statusCode) {\n      case 404:\n        console.log(\"Share not found\");\n        break;\n      case 409:\n        console.log(\"Share already exists\");\n        break;\n      case 403:\n        console.log(\"Access denied\");\n        break;\n      default:\n        console.error(`Storage error ${error.statusCode}: ${error.message}`);\n    }\n  }\n  throw error;\n}\n```\n\n## TypeScript Types Reference\n\n```typescript\nimport {\n  \u002F\u002F Clients\n  ShareServiceClient,\n  ShareClient,\n  ShareDirectoryClient,\n  ShareFileClient,\n\n  \u002F\u002F Authentication\n  StorageSharedKeyCredential,\n  AnonymousCredential,\n\n  \u002F\u002F SAS\n  FileSASPermissions,\n  ShareSASPermissions,\n  AccountSASPermissions,\n  AccountSASServices,\n  AccountSASResourceTypes,\n  generateFileSASQueryParameters,\n  generateAccountSASQueryParameters,\n\n  \u002F\u002F Options & Responses\n  ShareCreateResponse,\n  FileDownloadResponseModel,\n  DirectoryItem,\n  FileItem,\n  ShareProperties,\n  FileProperties,\n\n  \u002F\u002F Errors\n  RestError,\n} from \"@azure\u002Fstorage-file-share\";\n```\n\n## Best Practices\n\n1. **Use connection strings for simplicity** — Easiest setup for development\n2. **Use DefaultAzureCredential for production** — Enable managed identity in Azure\n3. **Set quotas on shares** — Prevent unexpected storage costs\n4. **Use streaming for large files** — `uploadStream`\u002F`downloadToFile` for files > 256MB\n5. **Use ranges for partial updates** — More efficient than full file replacement\n6. **Create snapshots before major changes** — Point-in-time recovery\n7. **Handle errors gracefully** — Check `RestError.statusCode` for specific handling\n8. **Use `*IfExists` methods** — For idempotent operations\n\n## Platform Differences\n\n| Feature | Node.js | Browser |\n|---------|---------|---------|\n| `StorageSharedKeyCredential` | ✅ | ❌ |\n| `uploadFile()` | ✅ | ❌ |\n| `uploadStream()` | ✅ | ❌ |\n| `downloadToFile()` | ✅ | ❌ |\n| `downloadToBuffer()` | ✅ | ❌ |\n| SAS generation | ✅ | ❌ |\n| DefaultAzureCredential | ✅ | ❌ |\n| Anonymous\u002FSAS access | ✅ | ✅ |\n\n## When to Use\nThis skill is applicable to execute the workflow or actions described in the overview.\n","# @azure\u002Fstorage-file-share (TypeScript\u002FJavaScript)\n\nSDK for Azure File Share operations — SMB file shares, directories, and file operations.\n\n## Installation\n\n```bash\nnpm install @azure\u002Fstorage-file-share @azure\u002Fidentity\n```\n\n**Current Version**: 12.x  \n**Node.js**: >= 18.0.0\n\n## Environment Variables\n\n```bash\nAZURE_STORAGE_ACCOUNT_NAME=\u003Caccount-name>\nAZURE_STORAGE_ACCOUNT_KEY=\u003Caccount-key>\n# OR connection string\nAZURE_STORAGE_CONNECTION_STRING=DefaultEndpointsProtocol=https;AccountName=...\n```\n\n## Authentication\n\n### Connection String (Simplest)\n\n```typescript\nimport { ShareServiceClient } from \"@azure\u002Fstorage-file-share\";\n\nconst client = ShareServiceClient.fromConnectionString(\n  process.env.AZURE_STORAGE_CONNECTION_STRING!\n);\n```\n\n### StorageSharedKeyCredential (Node.js only)\n\n```typescript\nimport { ShareServiceClient, StorageSharedKeyCredential } from \"@azure\u002Fstorage-file-share\";\n\nconst accountName = process.env.AZURE_STORAGE_ACCOUNT_NAME!;\nconst accountKey = process.env.AZURE_STORAGE_ACCOUNT_KEY!;\n\nconst sharedKeyCredential = new StorageSharedKeyCredential(accountName, accountKey);\nconst client = new ShareServiceClient(\n  `https:\u002F\u002F${accountName}.file.core.windows.net`,\n  sharedKeyCredential\n);\n```\n\n### DefaultAzureCredential\n\n```typescript\nimport { ShareServiceClient } from \"@azure\u002Fstorage-file-share\";\nimport { DefaultAzureCredential } from \"@azure\u002Fidentity\";\n\nconst accountName = process.env.AZURE_STORAGE_ACCOUNT_NAME!;\nconst client = new ShareServiceClient(\n  `https:\u002F\u002F${accountName}.file.core.windows.net`,\n  new DefaultAzureCredential()\n);\n```\n\n### SAS Token\n\n```typescript\nimport { ShareServiceClient } from \"@azure\u002Fstorage-file-share\";\n\nconst accountName = process.env.AZURE_STORAGE_ACCOUNT_NAME!;\nconst sasToken = process.env.AZURE_STORAGE_SAS_TOKEN!;\n\nconst client = new ShareServiceClient(\n  `https:\u002F\u002F${accountName}.file.core.windows.net${sasToken}`\n);\n```\n\n## Client Hierarchy\n\n```\nShareServiceClient (account level)\n└── ShareClient (share level)\n    └── ShareDirectoryClient (directory level)\n        └── ShareFileClient (file level)\n```\n\n## Share Operations\n\n### Create Share\n\n```typescript\nconst shareClient = client.getShareClient(\"my-share\");\nawait shareClient.create();\n\n\u002F\u002F Create with quota (in GB)\nawait shareClient.create({ quota: 100 });\n```\n\n### List Shares\n\n```typescript\nfor await (const share of client.listShares()) {\n  console.log(share.name, share.properties.quota);\n}\n\n\u002F\u002F With prefix filter\nfor await (const share of client.listShares({ prefix: \"logs-\" })) {\n  console.log(share.name);\n}\n```\n\n### Delete Share\n\n```typescript\nawait shareClient.delete();\n\n\u002F\u002F Delete if exists\nawait shareClient.deleteIfExists();\n```\n\n### Get Share Properties\n\n```typescript\nconst properties = await shareClient.getProperties();\nconsole.log(\"Quota:\", properties.quota, \"GB\");\nconsole.log(\"Last Modified:\", properties.lastModified);\n```\n\n### Set Share Quota\n\n```typescript\nawait shareClient.setQuota(200); \u002F\u002F 200 GB\n```\n\n## Directory Operations\n\n### Create Directory\n\n```typescript\nconst directoryClient = shareClient.getDirectoryClient(\"my-directory\");\nawait directoryClient.create();\n\n\u002F\u002F Create nested directory\nconst nestedDir = shareClient.getDirectoryClient(\"parent\u002Fchild\u002Fgrandchild\");\nawait nestedDir.create();\n```\n\n### List Directories and Files\n\n```typescript\nconst directoryClient = shareClient.getDirectoryClient(\"my-directory\");\n\nfor await (const item of directoryClient.listFilesAndDirectories()) {\n  if (item.kind === \"directory\") {\n    console.log(`[DIR] ${item.name}`);\n  } else {\n    console.log(`[FILE] ${item.name} (${item.properties.contentLength} bytes)`);\n  }\n}\n```\n\n### Delete Directory\n\n```typescript\nawait directoryClient.delete();\n\n\u002F\u002F Delete if exists\nawait directoryClient.deleteIfExists();\n```\n\n### Check if Directory Exists\n\n```typescript\nconst exists = await directoryClient.exists();\nif (!exists) {\n  await directoryClient.create();\n}\n```\n\n## File Operations\n\n### Upload File (Simple)\n\n```typescript\nconst fileClient = shareClient\n  .getDirectoryClient(\"my-directory\")\n  .getFileClient(\"my-file.txt\");\n\n\u002F\u002F Upload string\nconst content = \"Hello, World!\";\nawait fileClient.create(content.length);\nawait fileClient.uploadRange(content, 0, content.length);\n```\n\n### Upload File (Node.js - from local file)\n\n```typescript\nimport * as fs from \"fs\";\nimport * as path from \"path\";\n\nconst fileClient = shareClient.rootDirectoryClient.getFileClient(\"uploaded.txt\");\nconst localFilePath = \"\u002Fpath\u002Fto\u002Flocal\u002Ffile.txt\";\nconst fileSize = fs.statSync(localFilePath).size;\n\nawait fileClient.create(fileSize);\nawait fileClient.uploadFile(localFilePath);\n```\n\n### Upload File (Buffer)\n\n```typescript\nconst buffer = Buffer.from(\"Hello, Azure Files!\");\nconst fileClient = shareClient.rootDirectoryClient.getFileClient(\"buffer-file.txt\");\n\nawait fileClient.create(buffer.length);\nawait fileClient.uploadRange(buffer, 0, buffer.length);\n```\n\n### Upload File (Stream)\n\n```typescript\nimport * as fs from \"fs\";\n\nconst fileClient = shareClient.rootDirectoryClient.getFileClient(\"streamed.txt\");\nconst readStream = fs.createReadStream(\"\u002Fpath\u002Fto\u002Flocal\u002Ffile.txt\");\nconst fileSize = fs.statSync(\"\u002Fpath\u002Fto\u002Flocal\u002Ffile.txt\").size;\n\nawait fileClient.create(fileSize);\nawait fileClient.uploadStream(readStream, fileSize, 4 * 1024 * 1024, 4); \u002F\u002F 4MB buffer, 4 concurrency\n```\n\n### Download File\n\n```typescript\nconst fileClient = shareClient\n  .getDirectoryClient(\"my-directory\")\n  .getFileClient(\"my-file.txt\");\n\nconst downloadResponse = await fileClient.download();\n\n\u002F\u002F Read as string\nconst chunks: Buffer[] = [];\nfor await (const chunk of downloadResponse.readableStreamBody!) {\n  chunks.push(Buffer.from(chunk));\n}\nconst content = Buffer.concat(chunks).toString(\"utf-8\");\n```\n\n### Download to File (Node.js)\n\n```typescript\nconst fileClient = shareClient.rootDirectoryClient.getFileClient(\"my-file.txt\");\nawait fileClient.downloadToFile(\"\u002Fpath\u002Fto\u002Flocal\u002Fdestination.txt\");\n```\n\n### Download to Buffer (Node.js)\n\n```typescript\nconst fileClient = shareClient.rootDirectoryClient.getFileClient(\"my-file.txt\");\nconst buffer = await fileClient.downloadToBuffer();\nconsole.log(buffer.toString());\n```\n\n### Delete File\n\n```typescript\nconst fileClient = shareClient.rootDirectoryClient.getFileClient(\"my-file.txt\");\nawait fileClient.delete();\n\n\u002F\u002F Delete if exists\nawait fileClient.deleteIfExists();\n```\n\n### Copy File\n\n```typescript\nconst sourceUrl = \"https:\u002F\u002Faccount.file.core.windows.net\u002Fshare\u002Fsource.txt\";\nconst destFileClient = shareClient.rootDirectoryClient.getFileClient(\"destination.txt\");\n\n\u002F\u002F Start copy operation\nconst copyPoller = await destFileClient.startCopyFromURL(sourceUrl);\nawait copyPoller.pollUntilDone();\n```\n\n## File Properties & Metadata\n\n### Get File Properties\n\n```typescript\nconst fileClient = shareClient.rootDirectoryClient.getFileClient(\"my-file.txt\");\nconst properties = await fileClient.getProperties();\n\nconsole.log(\"Content-Length:\", properties.contentLength);\nconsole.log(\"Content-Type:\", properties.contentType);\nconsole.log(\"Last Modified:\", properties.lastModified);\nconsole.log(\"ETag:\", properties.etag);\n```\n\n### Set Metadata\n\n```typescript\nawait fileClient.setMetadata({\n  author: \"John Doe\",\n  category: \"documents\",\n});\n```\n\n### Set HTTP Headers\n\n```typescript\nawait fileClient.setHttpHeaders({\n  fileContentType: \"text\u002Fplain\",\n  fileCacheControl: \"max-age=3600\",\n  fileContentDisposition: \"attachment; filename=download.txt\",\n});\n```\n\n## Range Operations\n\n### Upload Range\n\n```typescript\nconst data = Buffer.from(\"partial content\");\nawait fileClient.uploadRange(data, 100, data.length); \u002F\u002F Write at offset 100\n```\n\n### Download Range\n\n```typescript\nconst downloadResponse = await fileClient.download(100, 50); \u002F\u002F offset 100, length 50\n```\n\n### Clear Range\n\n```typescript\nawait fileClient.clearRange(0, 100); \u002F\u002F Clear first 100 bytes\n```\n\n## Snapshot Operations\n\n### Create Snapshot\n\n```typescript\nconst snapshotResponse = await shareClient.createSnapshot();\nconsole.log(\"Snapshot:\", snapshotResponse.snapshot);\n```\n\n### Access Snapshot\n\n```typescript\nconst snapshotShareClient = shareClient.withSnapshot(snapshotResponse.snapshot!);\nconst snapshotFileClient = snapshotShareClient.rootDirectoryClient.getFileClient(\"file.txt\");\nconst content = await snapshotFileClient.downloadToBuffer();\n```\n\n### Delete Snapshot\n\n```typescript\nawait shareClient.delete({ deleteSnapshots: \"include\" });\n```\n\n## SAS Token Generation (Node.js only)\n\n### Generate File SAS\n\n```typescript\nimport {\n  generateFileSASQueryParameters,\n  FileSASPermissions,\n  StorageSharedKeyCredential,\n} from \"@azure\u002Fstorage-file-share\";\n\nconst sharedKeyCredential = new StorageSharedKeyCredential(accountName, accountKey);\n\nconst sasToken = generateFileSASQueryParameters(\n  {\n    shareName: \"my-share\",\n    filePath: \"my-directory\u002Fmy-file.txt\",\n    permissions: FileSASPermissions.parse(\"r\"), \u002F\u002F read only\n    expiresOn: new Date(Date.now() + 3600 * 1000), \u002F\u002F 1 hour\n  },\n  sharedKeyCredential\n).toString();\n\nconst sasUrl = `https:\u002F\u002F${accountName}.file.core.windows.net\u002Fmy-share\u002Fmy-directory\u002Fmy-file.txt?${sasToken}`;\n```\n\n### Generate Share SAS\n\n```typescript\nimport { ShareSASPermissions, generateFileSASQueryParameters } from \"@azure\u002Fstorage-file-share\";\n\nconst sasToken = generateFileSASQueryParameters(\n  {\n    shareName: \"my-share\",\n    permissions: ShareSASPermissions.parse(\"rcwdl\"), \u002F\u002F read, create, write, delete, list\n    expiresOn: new Date(Date.now() + 24 * 3600 * 1000), \u002F\u002F 24 hours\n  },\n  sharedKeyCredential\n).toString();\n```\n\n## Error Handling\n\n```typescript\nimport { RestError } from \"@azure\u002Fstorage-file-share\";\n\ntry {\n  await shareClient.create();\n} catch (error) {\n  if (error instanceof RestError) {\n    switch (error.statusCode) {\n      case 404:\n        console.log(\"Share not found\");\n        break;\n      case 409:\n        console.log(\"Share already exists\");\n        break;\n      case 403:\n        console.log(\"Access denied\");\n        break;\n      default:\n        console.error(`Storage error ${error.statusCode}: ${error.message}`);\n    }\n  }\n  throw error;\n}\n```\n\n## TypeScript Types Reference\n\n```typescript\nimport {\n  \u002F\u002F Clients\n  ShareServiceClient,\n  ShareClient,\n  ShareDirectoryClient,\n  ShareFileClient,\n\n  \u002F\u002F Authentication\n  StorageSharedKeyCredential,\n  AnonymousCredential,\n\n  \u002F\u002F SAS\n  FileSASPermissions,\n  ShareSASPermissions,\n  AccountSASPermissions,\n  AccountSASServices,\n  AccountSASResourceTypes,\n  generateFileSASQueryParameters,\n  generateAccountSASQueryParameters,\n\n  \u002F\u002F Options & Responses\n  ShareCreateResponse,\n  FileDownloadResponseModel,\n  DirectoryItem,\n  FileItem,\n  ShareProperties,\n  FileProperties,\n\n  \u002F\u002F Errors\n  RestError,\n} from \"@azure\u002Fstorage-file-share\";\n```\n\n## Best Practices\n\n1. **Use connection strings for simplicity** — Easiest setup for development\n2. **Use DefaultAzureCredential for production** — Enable managed identity in Azure\n3. **Set quotas on shares** — Prevent unexpected storage costs\n4. **Use streaming for large files** — `uploadStream`\u002F`downloadToFile` for files > 256MB\n5. **Use ranges for partial updates** — More efficient than full file replacement\n6. **Create snapshots before major changes** — Point-in-time recovery\n7. **Handle errors gracefully** — Check `RestError.statusCode` for specific handling\n8. **Use `*IfExists` methods** — For idempotent operations\n\n## Platform Differences\n\n| Feature | Node.js | Browser |\n|---------|---------|---------|\n| `StorageSharedKeyCredential` | ✅ | ❌ |\n| `uploadFile()` | ✅ | ❌ |\n| `uploadStream()` | ✅ | ❌ |\n| `downloadToFile()` | ✅ | ❌ |\n| `downloadToBuffer()` | ✅ | ❌ |\n| SAS generation | ✅ | ❌ |\n| DefaultAzureCredential | ✅ | ❌ |\n| Anonymous\u002FSAS access | ✅ | ✅ |\n\n## When to Use\nThis skill is applicable to execute the workflow or actions described in the overview.\n",{"name":5,"risk":36,"source":30,"date_added":37,"description":7},"unknown","2026-02-27","main","a50a3aa6b39fb0e1b7db88bef1bfc9c93606e126","modules\u002Fagent_skills\u002Fawesome-skills\u002Fplaybooks\u002Fazure-storage-file-share-ts",0,"https:\u002F\u002Fgithub.com\u002FSam-06060\u002Fjarvis-assistant","https:\u002F\u002Fgithub.com\u002FSam-06060","Mobile Application Developer | Kotlin | Flutter, KMP, Swfit, Android,Swift UI | Building at Saar It Resources | Creator of Jarvis (AI Assistant)","2026-06-23 05:13:38",{"source":8,"skillName":5,"commands":47,"prompt":57,"zipAvailable":58},[48,51,54],{"tool":49,"command":50},"npx","npx skills add Sam-06060\u002Fjarvis-assistant --skill azure-storage-file-share-ts",{"tool":52,"command":53},"bunx","bunx skills add Sam-06060\u002Fjarvis-assistant --skill azure-storage-file-share-ts",{"tool":55,"command":56},"pnpm","pnpm dlx skills add Sam-06060\u002Fjarvis-assistant --skill azure-storage-file-share-ts","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FSam-06060\u002Fjarvis-assistant\u002Fblob\u002Fmain\u002Fmodules\u002Fagent_skills\u002Fawesome-skills\u002Fplaybooks\u002Fazure-storage-file-share-ts\u002FSKILL.md",true,[],[61,74,89,116,135,162],{"skillNo":62,"name":63,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":71,"publishedAt":31},"01M6GDRVS6FXX3ESH0C9DW01C0","test_skill","https:\u002F\u002Fgithub.com\u002FSam-06060\u002Fjarvis-assistant\u002Fblob\u002Fmain\u002Fscratch\u002Ftest_skill\u002FSKILL.md",[66],{"categoryNo":67,"categoryName":68,"taxonomyType":69,"taxonomyTypeDesc":70},"01JBSEEDCAT000000000000008","测试与质量","SCENARIO","使用场景",[72,73],"Test Skill","test",{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":31},"01M6GDRQ40HX22MA6XWC31RHHK","zustand-store-ts","Create Zustand stores following established patterns with proper TypeScript types and middleware.","https:\u002F\u002Fgithub.com\u002FSam-06060\u002Fjarvis-assistant\u002Fblob\u002Fmain\u002Fmodules\u002Fagent_skills\u002Fawesome-skills\u002Fplaybooks\u002Fzustand-store-ts\u002FSKILL.md",[],[81,82,83,84,85,86,87,30,88,25],"zustand store ts","zustand","store","with","types","middleware","patterns","create",{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":98,"publishedAt":31},"01M6GDRKEA0WE670SPFWX5GKCN","zoom-automation","Automate Zoom meeting creation, management, recordings, webinars, and participant tracking via Rube MCP (Composio). Always search tools first for current schemas.","https:\u002F\u002Fgithub.com\u002FSam-06060\u002Fjarvis-assistant\u002Fblob\u002Fmain\u002Fmodules\u002Fagent_skills\u002Fawesome-skills\u002Fplaybooks\u002Fzoom-automation\u002FSKILL.md",[95],{"categoryNo":96,"categoryName":97,"taxonomyType":69,"taxonomyTypeDesc":70},"01JBSEEDCAT000000000000023","Skill与智能体开发",[99,100,101,102,103,104,105,106,107,108,109,110,111,112,30,113,114,115],"automation","zoom automation","zoom","first","Tools","search","MCP","via","meeting","automate","critical","creation","webinars","composio","recordings","management","tracking",{"skillNo":117,"name":118,"nameZh":6,"description":119,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":120,"categories":121,"keywords":123,"publishedAt":31},"01M6GDRFS1452PC71JQ38S24HR","zoho-crm-automation","Automate Zoho CRM tasks via Rube MCP (Composio): create\u002Fupdate records, search contacts, manage leads, and convert leads. Always search tools first for current schemas.","https:\u002F\u002Fgithub.com\u002FSam-06060\u002Fjarvis-assistant\u002Fblob\u002Fmain\u002Fmodules\u002Fagent_skills\u002Fawesome-skills\u002Fplaybooks\u002Fzoho-crm-automation\u002FSKILL.md",[122],{"categoryNo":96,"categoryName":97,"taxonomyType":69,"taxonomyTypeDesc":70},[124,99,125,126,127,128,129,30,104,130,112,131,109,108,103,132,88,133,105,134],"crm automation","zoho crm","crm","zoho crm automation","zoho","leads","contacts","records","update","tasks","manage",{"skillNo":136,"name":137,"nameZh":6,"description":138,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":139,"categories":140,"keywords":144,"publishedAt":31},"01M6GDRCKQBAVTGHX5XBH26KPZ","zod-validation-expert","Expert in Zod — TypeScript-first schema validation. Covers parsing, custom errors, refinements, type inference, and integration with React Hook Form, Next.js, and tRPC.","https:\u002F\u002Fgithub.com\u002FSam-06060\u002Fjarvis-assistant\u002Fblob\u002Fmain\u002Fmodules\u002Fagent_skills\u002Fawesome-skills\u002Fplaybooks\u002Fzod-validation-expert\u002FSKILL.md",[141],{"categoryNo":142,"categoryName":143,"taxonomyType":69,"taxonomyTypeDesc":70},"01JBSEEDCAT000000000000009","前端开发",[145,146,147,148,149,25,150,151,152,153,154,155,84,156,157,158,159,30,160,161],"expert","zod","zod validation expert","validation","react","safe","parsing","errors","schema validation","react hook form","hook","trpc","form","type","next","schema","Next.js",{"skillNo":163,"name":164,"nameZh":6,"description":165,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":166,"categories":167,"keywords":169,"publishedAt":31},"01M6GDR658B08K4MY0RWD4A6EH","zeroize-audit","Detects missing zeroization of sensitive data in source code and identifies zeroization removed by compiler optimizations, with assembly-level analysis, and control-flow verification. Use for auditing C\u002FC++\u002FRust code handling secrets, keys, passwords, or other sensitive data.","https:\u002F\u002Fgithub.com\u002FSam-06060\u002Fjarvis-assistant\u002Fblob\u002Fmain\u002Fmodules\u002Fagent_skills\u002Fawesome-skills\u002Fplaybooks\u002Fzeroize-audit\u002FSKILL.md",[168],{"categoryNo":96,"categoryName":97,"taxonomyType":69,"taxonomyTypeDesc":70},[170,171,172,173,174,175,176,177,30,178,179,180,181,182,183,184,185,186,187,105],"zeroize audit","audit","write","passwords","get","project","c++","activate","assembly","read","Bash","secrets","analysis","data","flow","verification","code","rust"]