azure-oss/storage-file-share

Azure Storage File Share PHP SDK

Maintainers

Package info

github.com/php-oss-for-azure/azure-storage-file-share-php

pkg:composer/azure-oss/storage-file-share

Transparency log

Statistics

Installs: 167

Dependents: 0

Suggesters: 0

Stars: 0

0.2.0 2026-08-20 13:21 UTC

This package is auto-updated.

Last update: 2026-08-20 13:23:01 UTC


README

Latest Version on Packagist Packagist Downloads

A PHP SDK for Azure Files service operations and SAS generation.

Important

This package is community-maintained and is not affiliated with, endorsed by, or supported by Microsoft.

Install

composer require azure-oss/storage-file-share

Documentation

Read the File Share docs at php-oss-for-azure.github.io/storage-file-share/core.

Migration Guide

Migrating from microsoft/azure-storage-file? Migrate from microsoft/azure-storage-file.

Quickstart

<?php

use AzureOss\Storage\File\Share\Sas\ShareFileSasPermissions;
use AzureOss\Storage\File\Share\Sas\ShareSasBuilder;
use AzureOss\Storage\File\Share\ShareServiceClient;

$service = ShareServiceClient::fromConnectionString(
    getenv('AZURE_STORAGE_CONNECTION_STRING')
);

$file = $service
    ->getShareClient('documents')
    ->getDirectoryClient('reports')
    ->getFileClient('summary.txt');

$sasUri = $file->generateSasUri(
    ShareSasBuilder::new()
        ->setPermissions(new ShareFileSasPermissions(read: true))
        ->setExpiresOn(new DateTimeImmutable('+15 minutes')),
);

echo $sasUri.PHP_EOL;

Related packages

Maintenance

This package is part of the community-maintained PHP OSS for Azure project. It is an independent project and is not affiliated with or endorsed by Microsoft.

License

This project is released under the MIT License. See LICENSE for details.