ShareFileClient.SetHttpHeadersAsync 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 SetHttpHeadersAsync(Nullable<Int64>, ShareFileHttpHeaders, FileSmbProperties, String, ShareFileRequestConditions, CancellationToken) operation sets system properties on the file.
For more information, see Set File Properties.
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.Shares.Models.ShareFileInfo>> SetHttpHeadersAsync (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 SetHttpHeadersAsync : Nullable<int64> * Azure.Storage.Files.Shares.Models.ShareFileHttpHeaders * Azure.Storage.Files.Shares.Models.FileSmbProperties * string * Azure.Storage.Files.Shares.Models.ShareFileRequestConditions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.Shares.Models.ShareFileInfo>>
override this.SetHttpHeadersAsync : Nullable<int64> * Azure.Storage.Files.Shares.Models.ShareFileHttpHeaders * Azure.Storage.Files.Shares.Models.FileSmbProperties * string * Azure.Storage.Files.Shares.Models.ShareFileRequestConditions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.Shares.Models.ShareFileInfo>>
Public Overridable Function SetHttpHeadersAsync (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 Task(Of 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
Opinia
https://aka.ms/ContentUserFeedback.
Dostępne już wkrótce: W 2024 r. będziemy stopniowo wycofywać zgłoszenia z serwisu GitHub jako mechanizm przesyłania opinii na temat zawartości i zastępować go nowym systemem opinii. Aby uzyskać więcej informacji, sprawdź:Prześlij i wyświetl opinię dla