ShareFileClient.SetHttpHeaders Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
The SetHttpHeaders(Nullable<Int64>, ShareFileHttpHeaders, FileSmbProperties, String, ShareFileRequestConditions, CancellationToken) operation sets system properties on the file.
For more information, see Set File Properties.
public virtual Azure.Response<Azure.Storage.Files.Shares.Models.ShareFileInfo> SetHttpHeaders (long? newSize = default, Azure.Storage.Files.Shares.Models.ShareFileHttpHeaders httpHeaders = default, Azure.Storage.Files.Shares.Models.FileSmbProperties smbProperties = default, string filePermission = default, Azure.Storage.Files.Shares.Models.ShareFileRequestConditions conditions = default, System.Threading.CancellationToken cancellationToken = default);
abstract member SetHttpHeaders : Nullable<int64> * Azure.Storage.Files.Shares.Models.ShareFileHttpHeaders * Azure.Storage.Files.Shares.Models.FileSmbProperties * string * Azure.Storage.Files.Shares.Models.ShareFileRequestConditions * System.Threading.CancellationToken -> Azure.Response<Azure.Storage.Files.Shares.Models.ShareFileInfo>
override this.SetHttpHeaders : Nullable<int64> * Azure.Storage.Files.Shares.Models.ShareFileHttpHeaders * Azure.Storage.Files.Shares.Models.FileSmbProperties * string * Azure.Storage.Files.Shares.Models.ShareFileRequestConditions * System.Threading.CancellationToken -> Azure.Response<Azure.Storage.Files.Shares.Models.ShareFileInfo>
Public Overridable Function SetHttpHeaders (Optional newSize As Nullable(Of Long) = Nothing, Optional httpHeaders As ShareFileHttpHeaders = Nothing, Optional smbProperties As FileSmbProperties = Nothing, Optional filePermission As String = Nothing, Optional conditions As ShareFileRequestConditions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Response(Of ShareFileInfo)
Parameters
Optional. Resizes a file to the specified size. If the specified byte value is less than the current size of the file, then all ranges above the specified byte value are cleared.
- httpHeaders
- ShareFileHttpHeaders
Optional. The standard HTTP header system properties to set. If not specified, existing values will be cleared.
- smbProperties
- FileSmbProperties
Optional SMB properties to set for the file.
- filePermission
- String
Optional file permission to set for the file.
- conditions
- ShareFileRequestConditions
Optional ShareFileRequestConditions to add conditions on creating the file.
- cancellationToken
- CancellationToken
Optional CancellationToken to propagate notifications that the operation should be cancelled.
Returns
A Response<T> describing the state of the file.
Remarks
A RequestFailedException will be thrown if a failure occurs.
Applies to
Azure SDK for .NET
Geri Bildirim
https://aka.ms/ContentUserFeedback.
Çok yakında: 2024 boyunca, içerik için geri bildirim mekanizması olarak GitHub Sorunları’nı kullanımdan kaldıracak ve yeni bir geri bildirim sistemiyle değiştireceğiz. Daha fazla bilgi için bkz.Gönderin ve geri bildirimi görüntüleyin