azure-docs-sdk-java/docs-ref-autogen/com.azure.storage.file.shar...

1400 строки
188 KiB
YAML

### YamlMime:JavaType
uid: "com.azure.storage.file.share.ShareFileClient"
fullName: "com.azure.storage.file.share.ShareFileClient"
name: "ShareFileClient"
nameWithType: "ShareFileClient"
summary: "This class provides a client that contains all the operations for interacting files under Azure Storage File Service."
inheritances:
- "<xref href=\"java.lang.Object?displayProperty=fullName\" data-throw-if-not-resolved=\"False\" />"
inheritedClassMethods:
- classRef: "java.lang.<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html\">Object</a>"
methodsRef:
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--\">clone</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-\">equals</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--\">finalize</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--\">getClass</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--\">hashCode</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--\">notify</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--\">notifyAll</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--\">toString</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--\">wait</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-\">wait</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-\">wait</a>"
syntax: "public class **ShareFileClient**"
methods:
- uid: "com.azure.storage.file.share.ShareFileClient.abortCopy(java.lang.String)"
fullName: "com.azure.storage.file.share.ShareFileClient.abortCopy(String copyId)"
name: "abortCopy(String copyId)"
nameWithType: "ShareFileClient.abortCopy(String copyId)"
summary: "Aborts a pending Copy File operation, and leaves a destination file with zero length and full metadata."
parameters:
- description: "Specifies the copy id which has copying pending status associate with it."
name: "copyId"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public void abortCopy(String copyId)"
desc: "Aborts a pending Copy File operation, and leaves a destination file with zero length and full metadata.\n\n**Code Samples**\n\nAbort copy file from copy id(\"someCopyId\")\n\n```java\nfileClient.abortCopy(\"someCopyId\");\n System.out.println(\"Abort copying the file completed.\");\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/abort-copy-file"
- uid: "com.azure.storage.file.share.ShareFileClient.abortCopyWithResponse(java.lang.String,com.azure.storage.file.share.models.ShareRequestConditions,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareFileClient.abortCopyWithResponse(String copyId, ShareRequestConditions requestConditions, Duration timeout, Context context)"
name: "abortCopyWithResponse(String copyId, ShareRequestConditions requestConditions, Duration timeout, Context context)"
nameWithType: "ShareFileClient.abortCopyWithResponse(String copyId, ShareRequestConditions requestConditions, Duration timeout, Context context)"
summary: "Aborts a pending Copy File operation, and leaves a destination file with zero length and full metadata."
parameters:
- description: "Specifies the copy id which has copying pending status associate with it."
name: "copyId"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "<xref uid=\"com.azure.storage.file.share.models.ShareRequestConditions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareRequestConditions\"></xref>"
name: "requestConditions"
type: "<xref href=\"com.azure.storage.file.share.models.ShareRequestConditions?alt=com.azure.storage.file.share.models.ShareRequestConditions&text=ShareRequestConditions\" data-throw-if-not-resolved=\"False\" />"
- description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be thrown."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Response<Void> abortCopyWithResponse(String copyId, ShareRequestConditions requestConditions, Duration timeout, Context context)"
desc: "Aborts a pending Copy File operation, and leaves a destination file with zero length and full metadata.\n\n**Code Samples**\n\nAbort copy file from copy id(\"someCopyId\")\n\n```java\nShareRequestConditions requestConditions = new ShareRequestConditions().setLeaseId(leaseId);\n Response<Void> response = fileClient.abortCopyWithResponse(\"someCopyId\", requestConditions,\n Duration.ofSeconds(1), new Context(key1, value1));\n System.out.printf(\"Abort copying the file completed with status code %d\", response.getStatusCode());\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/abort-copy-file"
returns:
description: "A response containing the status of aborting copy the file."
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" />&lt;<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Void.html\">Void</a>&gt;"
- uid: "com.azure.storage.file.share.ShareFileClient.abortCopyWithResponse(java.lang.String,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareFileClient.abortCopyWithResponse(String copyId, Duration timeout, Context context)"
name: "abortCopyWithResponse(String copyId, Duration timeout, Context context)"
nameWithType: "ShareFileClient.abortCopyWithResponse(String copyId, Duration timeout, Context context)"
summary: "Aborts a pending Copy File operation, and leaves a destination file with zero length and full metadata."
parameters:
- description: "Specifies the copy id which has copying pending status associate with it."
name: "copyId"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be thrown."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Response<Void> abortCopyWithResponse(String copyId, Duration timeout, Context context)"
desc: "Aborts a pending Copy File operation, and leaves a destination file with zero length and full metadata.\n\n**Code Samples**\n\nAbort copy file from copy id(\"someCopyId\")\n\n```java\nResponse<Void> response = fileClient.abortCopyWithResponse(\"someCopyId\", Duration.ofSeconds(1),\n new Context(key1, value1));\n System.out.printf(\"Abort copying the file completed with status code %d\", response.getStatusCode());\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/abort-copy-file"
returns:
description: "A response containing the status of aborting copy the file."
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" />&lt;<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Void.html\">Void</a>&gt;"
- uid: "com.azure.storage.file.share.ShareFileClient.beginCopy(java.lang.String,com.azure.storage.file.share.FileSmbProperties,java.lang.String,com.azure.storage.file.share.models.PermissionCopyModeType,java.lang.Boolean,java.lang.Boolean,java.util.Map<java.lang.String,java.lang.String>,java.time.Duration,com.azure.storage.file.share.models.ShareRequestConditions)"
fullName: "com.azure.storage.file.share.ShareFileClient.beginCopy(String sourceUrl, FileSmbProperties smbProperties, String filePermission, PermissionCopyModeType filePermissionCopyMode, Boolean ignoreReadOnly, Boolean setArchiveAttribute, Map<String,String> metadata, Duration pollInterval, ShareRequestConditions destinationRequestConditions)"
name: "beginCopy(String sourceUrl, FileSmbProperties smbProperties, String filePermission, PermissionCopyModeType filePermissionCopyMode, Boolean ignoreReadOnly, Boolean setArchiveAttribute, Map<String,String> metadata, Duration pollInterval, ShareRequestConditions destinationRequestConditions)"
nameWithType: "ShareFileClient.beginCopy(String sourceUrl, FileSmbProperties smbProperties, String filePermission, PermissionCopyModeType filePermissionCopyMode, Boolean ignoreReadOnly, Boolean setArchiveAttribute, Map<String,String> metadata, Duration pollInterval, ShareRequestConditions destinationRequestConditions)"
summary: "Copies a blob or file to a destination file within the storage account."
parameters:
- description: "Specifies the URL of the source file or blob, up to 2 KB in length."
name: "sourceUrl"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "The user settable file smb properties."
name: "smbProperties"
type: "<xref href=\"com.azure.storage.file.share.FileSmbProperties?alt=com.azure.storage.file.share.FileSmbProperties&text=FileSmbProperties\" data-throw-if-not-resolved=\"False\" />"
- description: "The file permission of the file."
name: "filePermission"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "Mode of file permission acquisition."
name: "filePermissionCopyMode"
type: "<xref href=\"com.azure.storage.file.share.models.PermissionCopyModeType?alt=com.azure.storage.file.share.models.PermissionCopyModeType&text=PermissionCopyModeType\" data-throw-if-not-resolved=\"False\" />"
- description: "Whether to copy despite target being read only. (default is false)"
name: "ignoreReadOnly"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Boolean.html\">Boolean</a>"
- description: "Whether the archive attribute is to be set on the target. (default is true)"
name: "setArchiveAttribute"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Boolean.html\">Boolean</a>"
- description: "Optional name-value pairs associated with the file as metadata. Metadata names must adhere to the\n naming rules."
name: "metadata"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/Map.html\">Map</a>&lt;<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>,<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>&gt;"
- description: "Duration between each poll for the copy status. If none is specified, a default of one second\n is used."
name: "pollInterval"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "<xref uid=\"com.azure.storage.file.share.models.ShareRequestConditions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareRequestConditions\"></xref>"
name: "destinationRequestConditions"
type: "<xref href=\"com.azure.storage.file.share.models.ShareRequestConditions?alt=com.azure.storage.file.share.models.ShareRequestConditions&text=ShareRequestConditions\" data-throw-if-not-resolved=\"False\" />"
syntax: "public SyncPoller<ShareFileCopyInfo,Void> beginCopy(String sourceUrl, FileSmbProperties smbProperties, String filePermission, PermissionCopyModeType filePermissionCopyMode, Boolean ignoreReadOnly, Boolean setArchiveAttribute, Map<String,String> metadata, Duration pollInterval, ShareRequestConditions destinationRequestConditions)"
desc: "Copies a blob or file to a destination file within the storage account.\n\n**Code Samples**\n\nCopy file from source getDirectoryUrl to the `resourcePath`\n\n```java\nFileSmbProperties smbProperties = new FileSmbProperties()\n .setNtfsFileAttributes(EnumSet.of(NtfsFileAttributes.READ_ONLY))\n .setFileCreationTime(OffsetDateTime.now())\n .setFileLastWriteTime(OffsetDateTime.now())\n .setFilePermissionKey(\"filePermissionKey\");\n String filePermission = \"filePermission\";\n // NOTE: filePermission and filePermissionKey should never be both set\n boolean ignoreReadOnly = false; // Default value\n boolean setArchiveAttribute = true; // Default value\n ShareRequestConditions requestConditions = new ShareRequestConditions().setLeaseId(leaseId);\n\n SyncPoller<ShareFileCopyInfo, Void> poller = fileClient.beginCopy(\n \"https://{accountName}.file.core.windows.net?{SASToken}\", smbProperties, filePermission,\n PermissionCopyModeType.SOURCE, ignoreReadOnly, setArchiveAttribute,\n Collections.singletonMap(\"file\", \"metadata\"), Duration.ofSeconds(2), requestConditions);\n\n final PollResponse<ShareFileCopyInfo> pollResponse = poller.poll();\n final ShareFileCopyInfo value = pollResponse.getValue();\n System.out.printf(\"Copy source: %s. Status: %s.%n\", value.getCopySourceUrl(), value.getCopyStatus());\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/copy-file"
returns:
description: "A <xref uid=\"com.azure.core.util.polling.SyncPoller\" data-throw-if-not-resolved=\"false\" data-raw-source=\"SyncPoller\"></xref> to poll the progress of copy operation."
type: "<xref href=\"com.azure.core.util.polling.SyncPoller?alt=com.azure.core.util.polling.SyncPoller&text=SyncPoller\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.storage.file.share.models.ShareFileCopyInfo?alt=com.azure.storage.file.share.models.ShareFileCopyInfo&text=ShareFileCopyInfo\" data-throw-if-not-resolved=\"False\" />,<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Void.html\">Void</a>&gt;"
- uid: "com.azure.storage.file.share.ShareFileClient.beginCopy(java.lang.String,com.azure.storage.file.share.options.ShareFileCopyOptions,java.time.Duration)"
fullName: "com.azure.storage.file.share.ShareFileClient.beginCopy(String sourceUrl, ShareFileCopyOptions options, Duration pollInterval)"
name: "beginCopy(String sourceUrl, ShareFileCopyOptions options, Duration pollInterval)"
nameWithType: "ShareFileClient.beginCopy(String sourceUrl, ShareFileCopyOptions options, Duration pollInterval)"
summary: "Copies a blob or file to a destination file within the storage account."
parameters:
- description: "Specifies the URL of the source file or blob, up to 2 KB in length."
name: "sourceUrl"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "<xref uid=\"com.azure.storage.file.share.options.ShareFileCopyOptions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareFileCopyOptions\"></xref>"
name: "options"
type: "<xref href=\"com.azure.storage.file.share.options.ShareFileCopyOptions?alt=com.azure.storage.file.share.options.ShareFileCopyOptions&text=ShareFileCopyOptions\" data-throw-if-not-resolved=\"False\" />"
- description: "Duration between each poll for the copy status. If none is specified, a default of one second\n is used."
name: "pollInterval"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
syntax: "public SyncPoller<ShareFileCopyInfo,Void> beginCopy(String sourceUrl, ShareFileCopyOptions options, Duration pollInterval)"
desc: "Copies a blob or file to a destination file within the storage account.\n\n**Code Samples**\n\nCopy file from source getDirectoryUrl to the `resourcePath`\n\n```java\nFileSmbProperties smbProperties = new FileSmbProperties()\n .setNtfsFileAttributes(EnumSet.of(NtfsFileAttributes.READ_ONLY))\n .setFileCreationTime(OffsetDateTime.now())\n .setFileLastWriteTime(OffsetDateTime.now())\n .setFilePermissionKey(\"filePermissionKey\");\n String filePermission = \"filePermission\";\n // NOTE: filePermission and filePermissionKey should never be both set\n boolean ignoreReadOnly = false; // Default value\n boolean setArchiveAttribute = true; // Default value\n ShareRequestConditions requestConditions = new ShareRequestConditions().setLeaseId(leaseId);\n CopyableFileSmbPropertiesList list = new CopyableFileSmbPropertiesList().setCreatedOn(true).setLastWrittenOn(true);\n // NOTE: FileSmbProperties and CopyableFileSmbPropertiesList should never be both set\n\n ShareFileCopyOptions options = new ShareFileCopyOptions()\n .setSmbProperties(smbProperties)\n .setFilePermission(filePermission)\n .setIgnoreReadOnly(ignoreReadOnly)\n .setArchiveAttribute(setArchiveAttribute)\n .setDestinationRequestConditions(requestConditions)\n .setSmbPropertiesToCopy(list)\n .setPermissionCopyModeType(PermissionCopyModeType.SOURCE)\n .setMetadata(Collections.singletonMap(\"file\", \"metadata\"));\n\n SyncPoller<ShareFileCopyInfo, Void> poller = fileClient.beginCopy(\n \"https://{accountName}.file.core.windows.net?{SASToken}\", options, Duration.ofSeconds(2));\n\n final PollResponse<ShareFileCopyInfo> pollResponse = poller.poll();\n final ShareFileCopyInfo value = pollResponse.getValue();\n System.out.printf(\"Copy source: %s. Status: %s.%n\", value.getCopySourceUrl(), value.getCopyStatus());\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/copy-file"
returns:
description: "A <xref uid=\"com.azure.core.util.polling.SyncPoller\" data-throw-if-not-resolved=\"false\" data-raw-source=\"SyncPoller\"></xref> to poll the progress of copy operation."
type: "<xref href=\"com.azure.core.util.polling.SyncPoller?alt=com.azure.core.util.polling.SyncPoller&text=SyncPoller\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.storage.file.share.models.ShareFileCopyInfo?alt=com.azure.storage.file.share.models.ShareFileCopyInfo&text=ShareFileCopyInfo\" data-throw-if-not-resolved=\"False\" />,<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Void.html\">Void</a>&gt;"
- uid: "com.azure.storage.file.share.ShareFileClient.beginCopy(java.lang.String,java.util.Map<java.lang.String,java.lang.String>,java.time.Duration)"
fullName: "com.azure.storage.file.share.ShareFileClient.beginCopy(String sourceUrl, Map<String,String> metadata, Duration pollInterval)"
name: "beginCopy(String sourceUrl, Map<String,String> metadata, Duration pollInterval)"
nameWithType: "ShareFileClient.beginCopy(String sourceUrl, Map<String,String> metadata, Duration pollInterval)"
summary: "Copies a blob or file to a destination file within the storage account."
parameters:
- description: "Specifies the URL of the source file or blob, up to 2 KB in length."
name: "sourceUrl"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "Optional name-value pairs associated with the file as metadata. Metadata names must adhere to the\n naming rules."
name: "metadata"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/Map.html\">Map</a>&lt;<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>,<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>&gt;"
- description: "Duration between each poll for the copy status. If none is specified, a default of one second\n is used."
name: "pollInterval"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
syntax: "public SyncPoller<ShareFileCopyInfo,Void> beginCopy(String sourceUrl, Map<String,String> metadata, Duration pollInterval)"
desc: "Copies a blob or file to a destination file within the storage account.\n\n**Code Samples**\n\nCopy file from source getDirectoryUrl to the `resourcePath`\n\n```java\nSyncPoller<ShareFileCopyInfo, Void> poller = fileClient.beginCopy(\n \"https://{accountName}.file.core.windows.net?{SASToken}\",\n Collections.singletonMap(\"file\", \"metadata\"), Duration.ofSeconds(2));\n\n final PollResponse<ShareFileCopyInfo> pollResponse = poller.poll();\n final ShareFileCopyInfo value = pollResponse.getValue();\n System.out.printf(\"Copy source: %s. Status: %s.%n\", value.getCopySourceUrl(), value.getCopyStatus());\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/copy-file"
returns:
description: "A <xref uid=\"com.azure.core.util.polling.SyncPoller\" data-throw-if-not-resolved=\"false\" data-raw-source=\"SyncPoller\"></xref> to poll the progress of copy operation."
type: "<xref href=\"com.azure.core.util.polling.SyncPoller?alt=com.azure.core.util.polling.SyncPoller&text=SyncPoller\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.storage.file.share.models.ShareFileCopyInfo?alt=com.azure.storage.file.share.models.ShareFileCopyInfo&text=ShareFileCopyInfo\" data-throw-if-not-resolved=\"False\" />,<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Void.html\">Void</a>&gt;"
- uid: "com.azure.storage.file.share.ShareFileClient.clearRange(long)"
fullName: "com.azure.storage.file.share.ShareFileClient.clearRange(long length)"
name: "clearRange(long length)"
nameWithType: "ShareFileClient.clearRange(long length)"
summary: "Clears a range of bytes to specific of a file in storage file service."
parameters:
- description: "Specifies the number of bytes being cleared."
name: "length"
type: "<xref href=\"long?alt=long&text=long\" data-throw-if-not-resolved=\"False\" />"
syntax: "public ShareFileUploadInfo clearRange(long length)"
desc: "Clears a range of bytes to specific of a file in storage file service. Clear operations performs an in-place write on the specified file.\n\n**Code Samples**\n\nClears the first 1024 bytes.\n\n```java\nShareFileUploadInfo response = fileClient.clearRange(1024);\n System.out.println(\"Complete clearing the range with eTag: \" + response.getETag());\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/put-range"
returns:
description: "The <xref uid=\"com.azure.storage.file.share.models.ShareFileUploadInfo\" data-throw-if-not-resolved=\"false\" data-raw-source=\"file upload info\"></xref>"
type: "<xref href=\"com.azure.storage.file.share.models.ShareFileUploadInfo?alt=com.azure.storage.file.share.models.ShareFileUploadInfo&text=ShareFileUploadInfo\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.storage.file.share.ShareFileClient.clearRangeWithResponse(long,long,com.azure.storage.file.share.models.ShareRequestConditions,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareFileClient.clearRangeWithResponse(long length, long offset, ShareRequestConditions requestConditions, Duration timeout, Context context)"
name: "clearRangeWithResponse(long length, long offset, ShareRequestConditions requestConditions, Duration timeout, Context context)"
nameWithType: "ShareFileClient.clearRangeWithResponse(long length, long offset, ShareRequestConditions requestConditions, Duration timeout, Context context)"
summary: "Clears a range of bytes to specific of a file in storage file service."
parameters:
- description: "Specifies the number of bytes being transmitted in the request body."
name: "length"
type: "<xref href=\"long?alt=long&text=long\" data-throw-if-not-resolved=\"False\" />"
- description: "Starting point of the upload range, if <code>null</code> it will start from the beginning."
name: "offset"
type: "<xref href=\"long?alt=long&text=long\" data-throw-if-not-resolved=\"False\" />"
- description: "<xref uid=\"com.azure.storage.file.share.models.ShareRequestConditions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareRequestConditions\"></xref>"
name: "requestConditions"
type: "<xref href=\"com.azure.storage.file.share.models.ShareRequestConditions?alt=com.azure.storage.file.share.models.ShareRequestConditions&text=ShareRequestConditions\" data-throw-if-not-resolved=\"False\" />"
- description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be thrown."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Response<ShareFileUploadInfo> clearRangeWithResponse(long length, long offset, ShareRequestConditions requestConditions, Duration timeout, Context context)"
desc: "Clears a range of bytes to specific of a file in storage file service. Upload operations performs an in-place write on the specified file.\n\n**Code Samples**\n\nClear the range starting from 1024 with length of 1024.\n\n```java\nShareRequestConditions requestConditions = new ShareRequestConditions().setLeaseId(leaseId);\n Response<ShareFileUploadInfo> response = fileClient.clearRangeWithResponse(1024, 1024, requestConditions,\n Duration.ofSeconds(1), new Context(key1, value1));\n System.out.println(\"Complete clearing the range with status code: \" + response.getStatusCode());\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/put-range"
returns:
description: "A response containing the <xref uid=\"com.azure.storage.file.share.models.ShareFileUploadInfo\" data-throw-if-not-resolved=\"false\" data-raw-source=\"file upload info\"></xref> with headers and response\n status code."
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.storage.file.share.models.ShareFileUploadInfo?alt=com.azure.storage.file.share.models.ShareFileUploadInfo&text=ShareFileUploadInfo\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.storage.file.share.ShareFileClient.clearRangeWithResponse(long,long,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareFileClient.clearRangeWithResponse(long length, long offset, Duration timeout, Context context)"
name: "clearRangeWithResponse(long length, long offset, Duration timeout, Context context)"
nameWithType: "ShareFileClient.clearRangeWithResponse(long length, long offset, Duration timeout, Context context)"
summary: "Clears a range of bytes to specific of a file in storage file service."
parameters:
- description: "Specifies the number of bytes being transmitted in the request body."
name: "length"
type: "<xref href=\"long?alt=long&text=long\" data-throw-if-not-resolved=\"False\" />"
- description: "Starting point of the upload range, if <code>null</code> it will start from the beginning."
name: "offset"
type: "<xref href=\"long?alt=long&text=long\" data-throw-if-not-resolved=\"False\" />"
- description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be thrown."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Response<ShareFileUploadInfo> clearRangeWithResponse(long length, long offset, Duration timeout, Context context)"
desc: "Clears a range of bytes to specific of a file in storage file service. Upload operations performs an in-place write on the specified file.\n\n**Code Samples**\n\nClear the range starting from 1024 with length of 1024.\n\n```java\nResponse<ShareFileUploadInfo> response = fileClient.clearRangeWithResponse(1024, 1024,\n Duration.ofSeconds(1), new Context(key1, value1));\n System.out.println(\"Complete clearing the range with status code: \" + response.getStatusCode());\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/put-range"
returns:
description: "A response containing the <xref uid=\"com.azure.storage.file.share.models.ShareFileUploadInfo\" data-throw-if-not-resolved=\"false\" data-raw-source=\"file upload info\"></xref> with headers and response\n status code."
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.storage.file.share.models.ShareFileUploadInfo?alt=com.azure.storage.file.share.models.ShareFileUploadInfo&text=ShareFileUploadInfo\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.storage.file.share.ShareFileClient.create(long)"
fullName: "com.azure.storage.file.share.ShareFileClient.create(long maxSize)"
name: "create(long maxSize)"
nameWithType: "ShareFileClient.create(long maxSize)"
summary: "Creates a file in the storage account and returns a response of <xref uid=\"com.azure.storage.file.share.models.ShareFileInfo\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareFileInfo\"></xref> to interact with it."
parameters:
- description: "The maximum size in bytes for the file."
name: "maxSize"
type: "<xref href=\"long?alt=long&text=long\" data-throw-if-not-resolved=\"False\" />"
syntax: "public ShareFileInfo create(long maxSize)"
desc: "Creates a file in the storage account and returns a response of <xref uid=\"com.azure.storage.file.share.models.ShareFileInfo\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareFileInfo\"></xref> to interact with it.\n\n**Code Samples**\n\nCreate the file with length of 1024 bytes, some headers and metadata.\n\n```java\nShareFileInfo response = fileClient.create(1024);\n System.out.println(\"Complete creating the file.\");\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/create-file"
returns:
description: "The <xref uid=\"com.azure.storage.file.share.models.ShareFileInfo\" data-throw-if-not-resolved=\"false\" data-raw-source=\"file info\"></xref>"
type: "<xref href=\"com.azure.storage.file.share.models.ShareFileInfo?alt=com.azure.storage.file.share.models.ShareFileInfo&text=ShareFileInfo\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.storage.file.share.ShareFileClient.createWithResponse(long,com.azure.storage.file.share.models.ShareFileHttpHeaders,com.azure.storage.file.share.FileSmbProperties,java.lang.String,java.util.Map<java.lang.String,java.lang.String>,com.azure.storage.file.share.models.ShareRequestConditions,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareFileClient.createWithResponse(long maxSize, ShareFileHttpHeaders httpHeaders, FileSmbProperties smbProperties, String filePermission, Map<String,String> metadata, ShareRequestConditions requestConditions, Duration timeout, Context context)"
name: "createWithResponse(long maxSize, ShareFileHttpHeaders httpHeaders, FileSmbProperties smbProperties, String filePermission, Map<String,String> metadata, ShareRequestConditions requestConditions, Duration timeout, Context context)"
nameWithType: "ShareFileClient.createWithResponse(long maxSize, ShareFileHttpHeaders httpHeaders, FileSmbProperties smbProperties, String filePermission, Map<String,String> metadata, ShareRequestConditions requestConditions, Duration timeout, Context context)"
summary: "Creates a file in the storage account and returns a response of Share<wbr>File<wbr>Info to interact with it."
parameters:
- description: "The maximum size in bytes for the file."
name: "maxSize"
type: "<xref href=\"long?alt=long&text=long\" data-throw-if-not-resolved=\"False\" />"
- description: "The user settable file http headers."
name: "httpHeaders"
type: "<xref href=\"com.azure.storage.file.share.models.ShareFileHttpHeaders?alt=com.azure.storage.file.share.models.ShareFileHttpHeaders&text=ShareFileHttpHeaders\" data-throw-if-not-resolved=\"False\" />"
- description: "The user settable file smb properties."
name: "smbProperties"
type: "<xref href=\"com.azure.storage.file.share.FileSmbProperties?alt=com.azure.storage.file.share.FileSmbProperties&text=FileSmbProperties\" data-throw-if-not-resolved=\"False\" />"
- description: "The file permission of the file."
name: "filePermission"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "Optional name-value pairs associated with the file as metadata."
name: "metadata"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/Map.html\">Map</a>&lt;<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>,<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>&gt;"
- description: "<xref uid=\"com.azure.storage.file.share.models.ShareRequestConditions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareRequestConditions\"></xref>"
name: "requestConditions"
type: "<xref href=\"com.azure.storage.file.share.models.ShareRequestConditions?alt=com.azure.storage.file.share.models.ShareRequestConditions&text=ShareRequestConditions\" data-throw-if-not-resolved=\"False\" />"
- description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be thrown."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Response<ShareFileInfo> createWithResponse(long maxSize, ShareFileHttpHeaders httpHeaders, FileSmbProperties smbProperties, String filePermission, Map<String,String> metadata, ShareRequestConditions requestConditions, Duration timeout, Context context)"
desc: "Creates a file in the storage account and returns a response of ShareFileInfo to interact with it.\n\n**Code Samples**\n\nCreate the file with length of 1024 bytes, some headers, file smb properties and metadata.\n\n```java\nShareFileHttpHeaders httpHeaders = new ShareFileHttpHeaders()\n .setContentType(\"text/html\")\n .setContentEncoding(\"gzip\")\n .setContentLanguage(\"en\")\n .setCacheControl(\"no-transform\")\n .setContentDisposition(\"attachment\");\n FileSmbProperties smbProperties = new FileSmbProperties()\n .setNtfsFileAttributes(EnumSet.of(NtfsFileAttributes.READ_ONLY))\n .setFileCreationTime(OffsetDateTime.now())\n .setFileLastWriteTime(OffsetDateTime.now())\n .setFilePermissionKey(\"filePermissionKey\");\n String filePermission = \"filePermission\";\n // NOTE: filePermission and filePermissionKey should never be both set\n\n ShareRequestConditions requestConditions = new ShareRequestConditions().setLeaseId(leaseId);\n\n Response<ShareFileInfo> response = fileClient.createWithResponse(1024, httpHeaders, smbProperties,\n filePermission, Collections.singletonMap(\"directory\", \"metadata\"), requestConditions, Duration.ofSeconds(1),\n new Context(key1, value1));\n System.out.printf(\"Creating the file completed with status code %d\", response.getStatusCode());\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/create-file"
returns:
description: "A response containing the <xref uid=\"com.azure.storage.file.share.models.ShareFileInfo\" data-throw-if-not-resolved=\"false\" data-raw-source=\"file info\"></xref> and the status of creating the file."
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.storage.file.share.models.ShareFileInfo?alt=com.azure.storage.file.share.models.ShareFileInfo&text=ShareFileInfo\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.storage.file.share.ShareFileClient.createWithResponse(long,com.azure.storage.file.share.models.ShareFileHttpHeaders,com.azure.storage.file.share.FileSmbProperties,java.lang.String,java.util.Map<java.lang.String,java.lang.String>,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareFileClient.createWithResponse(long maxSize, ShareFileHttpHeaders httpHeaders, FileSmbProperties smbProperties, String filePermission, Map<String,String> metadata, Duration timeout, Context context)"
name: "createWithResponse(long maxSize, ShareFileHttpHeaders httpHeaders, FileSmbProperties smbProperties, String filePermission, Map<String,String> metadata, Duration timeout, Context context)"
nameWithType: "ShareFileClient.createWithResponse(long maxSize, ShareFileHttpHeaders httpHeaders, FileSmbProperties smbProperties, String filePermission, Map<String,String> metadata, Duration timeout, Context context)"
summary: "Creates a file in the storage account and returns a response of Share<wbr>File<wbr>Info to interact with it."
parameters:
- description: "The maximum size in bytes for the file."
name: "maxSize"
type: "<xref href=\"long?alt=long&text=long\" data-throw-if-not-resolved=\"False\" />"
- description: "The user settable file http headers."
name: "httpHeaders"
type: "<xref href=\"com.azure.storage.file.share.models.ShareFileHttpHeaders?alt=com.azure.storage.file.share.models.ShareFileHttpHeaders&text=ShareFileHttpHeaders\" data-throw-if-not-resolved=\"False\" />"
- description: "The user settable file smb properties."
name: "smbProperties"
type: "<xref href=\"com.azure.storage.file.share.FileSmbProperties?alt=com.azure.storage.file.share.FileSmbProperties&text=FileSmbProperties\" data-throw-if-not-resolved=\"False\" />"
- description: "The file permission of the file."
name: "filePermission"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "Optional name-value pairs associated with the file as metadata."
name: "metadata"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/Map.html\">Map</a>&lt;<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>,<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>&gt;"
- description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be thrown."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Response<ShareFileInfo> createWithResponse(long maxSize, ShareFileHttpHeaders httpHeaders, FileSmbProperties smbProperties, String filePermission, Map<String,String> metadata, Duration timeout, Context context)"
desc: "Creates a file in the storage account and returns a response of ShareFileInfo to interact with it.\n\n**Code Samples**\n\nCreate the file with length of 1024 bytes, some headers, file smb properties and metadata.\n\n```java\nShareFileHttpHeaders httpHeaders = new ShareFileHttpHeaders()\n .setContentType(\"text/html\")\n .setContentEncoding(\"gzip\")\n .setContentLanguage(\"en\")\n .setCacheControl(\"no-transform\")\n .setContentDisposition(\"attachment\");\n FileSmbProperties smbProperties = new FileSmbProperties()\n .setNtfsFileAttributes(EnumSet.of(NtfsFileAttributes.READ_ONLY))\n .setFileCreationTime(OffsetDateTime.now())\n .setFileLastWriteTime(OffsetDateTime.now())\n .setFilePermissionKey(\"filePermissionKey\");\n String filePermission = \"filePermission\";\n // NOTE: filePermission and filePermissionKey should never be both set\n Response<ShareFileInfo> response = fileClient.createWithResponse(1024, httpHeaders, smbProperties,\n filePermission, Collections.singletonMap(\"directory\", \"metadata\"), Duration.ofSeconds(1),\n new Context(key1, value1));\n System.out.printf(\"Creating the file completed with status code %d\", response.getStatusCode());\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/create-file"
returns:
description: "A response containing the <xref uid=\"com.azure.storage.file.share.models.ShareFileInfo\" data-throw-if-not-resolved=\"false\" data-raw-source=\"file info\"></xref> and the status of creating the file."
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.storage.file.share.models.ShareFileInfo?alt=com.azure.storage.file.share.models.ShareFileInfo&text=ShareFileInfo\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.storage.file.share.ShareFileClient.delete()"
fullName: "com.azure.storage.file.share.ShareFileClient.delete()"
name: "delete()"
nameWithType: "ShareFileClient.delete()"
summary: "Deletes the file associate with the client."
syntax: "public void delete()"
desc: "Deletes the file associate with the client.\n\n**Code Samples**\n\nDelete the file\n\n```java\nfileClient.delete();\n System.out.println(\"Complete deleting the file.\");\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/delete-file2"
- uid: "com.azure.storage.file.share.ShareFileClient.deleteIfExists()"
fullName: "com.azure.storage.file.share.ShareFileClient.deleteIfExists()"
name: "deleteIfExists()"
nameWithType: "ShareFileClient.deleteIfExists()"
summary: "Deletes the file associate with the client if it exists."
syntax: "public boolean deleteIfExists()"
desc: "Deletes the file associate with the client if it exists.\n\n**Code Samples**\n\nDelete the file\n\n```java\nboolean result = fileClient.deleteIfExists();\n System.out.println(\"File deleted: \" + result);\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/delete-file2"
returns:
description: "<code>true</code> if the file is successfully deleted, <code>false</code> if the file does not exist."
type: "<xref href=\"boolean?alt=boolean&text=boolean\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.storage.file.share.ShareFileClient.deleteIfExistsWithResponse(com.azure.storage.file.share.models.ShareRequestConditions,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareFileClient.deleteIfExistsWithResponse(ShareRequestConditions requestConditions, Duration timeout, Context context)"
name: "deleteIfExistsWithResponse(ShareRequestConditions requestConditions, Duration timeout, Context context)"
nameWithType: "ShareFileClient.deleteIfExistsWithResponse(ShareRequestConditions requestConditions, Duration timeout, Context context)"
summary: "Deletes the file associate with the client if it exists."
parameters:
- description: "<xref uid=\"com.azure.storage.file.share.models.ShareRequestConditions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareRequestConditions\"></xref>"
name: "requestConditions"
type: "<xref href=\"com.azure.storage.file.share.models.ShareRequestConditions?alt=com.azure.storage.file.share.models.ShareRequestConditions&text=ShareRequestConditions\" data-throw-if-not-resolved=\"False\" />"
- description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be thrown."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Response<Boolean> deleteIfExistsWithResponse(ShareRequestConditions requestConditions, Duration timeout, Context context)"
desc: "Deletes the file associate with the client if it exists.\n\n**Code Samples**\n\nDelete the file\n\n```java\nShareRequestConditions requestConditions = new ShareRequestConditions().setLeaseId(leaseId);\n Response<Boolean> response = fileClient.deleteIfExistsWithResponse(requestConditions, Duration.ofSeconds(1),\n new Context(key1, value1));\n if (response.getStatusCode() == 404) {\n System.out.println(\"Does not exist.\");\n } else {\n System.out.printf(\"Delete completed with status %d%n\", response.getStatusCode());\n }\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/delete-file2"
returns:
description: "A response containing status code and HTTP headers. If <xref uid=\"com.azure.core.http.rest.Response\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Response\"></xref>'s status code is 202, the file\n was successfully deleted. If status code is 404, the file does not exist."
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" />&lt;<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Boolean.html\">Boolean</a>&gt;"
- uid: "com.azure.storage.file.share.ShareFileClient.deleteWithResponse(com.azure.storage.file.share.models.ShareRequestConditions,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareFileClient.deleteWithResponse(ShareRequestConditions requestConditions, Duration timeout, Context context)"
name: "deleteWithResponse(ShareRequestConditions requestConditions, Duration timeout, Context context)"
nameWithType: "ShareFileClient.deleteWithResponse(ShareRequestConditions requestConditions, Duration timeout, Context context)"
summary: "Deletes the file associate with the client."
parameters:
- description: "<xref uid=\"com.azure.storage.file.share.models.ShareRequestConditions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareRequestConditions\"></xref>"
name: "requestConditions"
type: "<xref href=\"com.azure.storage.file.share.models.ShareRequestConditions?alt=com.azure.storage.file.share.models.ShareRequestConditions&text=ShareRequestConditions\" data-throw-if-not-resolved=\"False\" />"
- description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be thrown."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Response<Void> deleteWithResponse(ShareRequestConditions requestConditions, Duration timeout, Context context)"
desc: "Deletes the file associate with the client.\n\n**Code Samples**\n\nDelete the file\n\n```java\nShareRequestConditions requestConditions = new ShareRequestConditions().setLeaseId(leaseId);\n Response<Void> response = fileClient.deleteWithResponse(requestConditions, Duration.ofSeconds(1),\n new Context(key1, value1));\n System.out.println(\"Complete deleting the file with status code: \" + response.getStatusCode());\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/delete-file2"
returns:
description: "A response that only contains headers and response status code"
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" />&lt;<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Void.html\">Void</a>&gt;"
- uid: "com.azure.storage.file.share.ShareFileClient.deleteWithResponse(java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareFileClient.deleteWithResponse(Duration timeout, Context context)"
name: "deleteWithResponse(Duration timeout, Context context)"
nameWithType: "ShareFileClient.deleteWithResponse(Duration timeout, Context context)"
summary: "Deletes the file associate with the client."
parameters:
- description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be thrown."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Response<Void> deleteWithResponse(Duration timeout, Context context)"
desc: "Deletes the file associate with the client.\n\n**Code Samples**\n\nDelete the file\n\n```java\nResponse<Void> response = fileClient.deleteWithResponse(Duration.ofSeconds(1), new Context(key1, value1));\n System.out.println(\"Complete deleting the file with status code: \" + response.getStatusCode());\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/delete-file2"
returns:
description: "A response that only contains headers and response status code"
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" />&lt;<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Void.html\">Void</a>&gt;"
- uid: "com.azure.storage.file.share.ShareFileClient.download(java.io.OutputStream)"
fullName: "com.azure.storage.file.share.ShareFileClient.download(OutputStream stream)"
name: "download(OutputStream stream)"
nameWithType: "ShareFileClient.download(OutputStream stream)"
summary: "Downloads a file from the system, including its metadata and properties"
parameters:
- description: "A non-null <xref uid=\"java.io.OutputStream\" data-throw-if-not-resolved=\"false\" data-raw-source=\"OutputStream\"></xref> where the downloaded data will be written."
name: "stream"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/io/OutputStream.html\">OutputStream</a>"
syntax: "public void download(OutputStream stream)"
desc: "Downloads a file from the system, including its metadata and properties\n\n**Code Samples**\n\nDownload the file with its metadata and properties.\n\n```java\ntry {\n ByteArrayOutputStream stream = new ByteArrayOutputStream();\n fileClient.download(stream);\n System.out.printf(\"Completed downloading the file with content: %n%s%n\",\n new String(stream.toByteArray(), StandardCharsets.UTF_8));\n } catch (Throwable throwable) {\n System.err.printf(\"Downloading failed with exception. Message: %s%n\", throwable.getMessage());\n }\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/get-file"
- uid: "com.azure.storage.file.share.ShareFileClient.downloadToFile(java.lang.String)"
fullName: "com.azure.storage.file.share.ShareFileClient.downloadToFile(String downloadFilePath)"
name: "downloadToFile(String downloadFilePath)"
nameWithType: "ShareFileClient.downloadToFile(String downloadFilePath)"
summary: "Downloads a file from the system, including its metadata and properties into a file specified by the path."
parameters:
- description: "The path where store the downloaded file"
name: "downloadFilePath"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public ShareFileProperties downloadToFile(String downloadFilePath)"
desc: "Downloads a file from the system, including its metadata and properties into a file specified by the path.\n\nThe file will be created and must not exist, if the file already exists a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"FileAlreadyExistsException\"></xref> will be thrown.\n\n**Code Samples**\n\nDownload the file to current folder.\n\n```java\nfileClient.downloadToFile(\"somelocalfilepath\");\n if (Files.exists(Paths.get(\"somelocalfilepath\"))) {\n System.out.println(\"Complete downloading the file.\");\n }\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/get-file"
returns:
description: "The properties of the file."
type: "<xref href=\"com.azure.storage.file.share.models.ShareFileProperties?alt=com.azure.storage.file.share.models.ShareFileProperties&text=ShareFileProperties\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.storage.file.share.ShareFileClient.downloadToFileWithResponse(java.lang.String,com.azure.storage.file.share.models.ShareFileRange,com.azure.storage.file.share.models.ShareRequestConditions,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareFileClient.downloadToFileWithResponse(String downloadFilePath, ShareFileRange range, ShareRequestConditions requestConditions, Duration timeout, Context context)"
name: "downloadToFileWithResponse(String downloadFilePath, ShareFileRange range, ShareRequestConditions requestConditions, Duration timeout, Context context)"
nameWithType: "ShareFileClient.downloadToFileWithResponse(String downloadFilePath, ShareFileRange range, ShareRequestConditions requestConditions, Duration timeout, Context context)"
summary: "Downloads a file from the system, including its metadata and properties into a file specified by the path."
parameters:
- description: "The path where store the downloaded file"
name: "downloadFilePath"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "Optional byte range which returns file data only from the specified range."
name: "range"
type: "<xref href=\"com.azure.storage.file.share.models.ShareFileRange?alt=com.azure.storage.file.share.models.ShareFileRange&text=ShareFileRange\" data-throw-if-not-resolved=\"False\" />"
- description: "<xref uid=\"com.azure.storage.file.share.models.ShareRequestConditions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareRequestConditions\"></xref>"
name: "requestConditions"
type: "<xref href=\"com.azure.storage.file.share.models.ShareRequestConditions?alt=com.azure.storage.file.share.models.ShareRequestConditions&text=ShareRequestConditions\" data-throw-if-not-resolved=\"False\" />"
- description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be thrown."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Response<ShareFileProperties> downloadToFileWithResponse(String downloadFilePath, ShareFileRange range, ShareRequestConditions requestConditions, Duration timeout, Context context)"
desc: "Downloads a file from the system, including its metadata and properties into a file specified by the path.\n\nThe file will be created and must not exist, if the file already exists a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"FileAlreadyExistsException\"></xref> will be thrown.\n\n**Code Samples**\n\nDownload the file from 1024 to 2048 bytes to current folder.\n\n```java\nShareRequestConditions requestConditions = new ShareRequestConditions().setLeaseId(leaseId);\n Response<ShareFileProperties> response =\n fileClient.downloadToFileWithResponse(\"somelocalfilepath\", new ShareFileRange(1024, 2047L),\n requestConditions, Duration.ofSeconds(1), Context.NONE);\n if (Files.exists(Paths.get(\"somelocalfilepath\"))) {\n System.out.println(\"Complete downloading the file with status code \" + response.getStatusCode());\n }\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/get-file"
returns:
description: "The response of the file properties."
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.storage.file.share.models.ShareFileProperties?alt=com.azure.storage.file.share.models.ShareFileProperties&text=ShareFileProperties\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.storage.file.share.ShareFileClient.downloadToFileWithResponse(java.lang.String,com.azure.storage.file.share.models.ShareFileRange,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareFileClient.downloadToFileWithResponse(String downloadFilePath, ShareFileRange range, Duration timeout, Context context)"
name: "downloadToFileWithResponse(String downloadFilePath, ShareFileRange range, Duration timeout, Context context)"
nameWithType: "ShareFileClient.downloadToFileWithResponse(String downloadFilePath, ShareFileRange range, Duration timeout, Context context)"
summary: "Downloads a file from the system, including its metadata and properties into a file specified by the path."
parameters:
- description: "The path where store the downloaded file"
name: "downloadFilePath"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "Optional byte range which returns file data only from the specified range."
name: "range"
type: "<xref href=\"com.azure.storage.file.share.models.ShareFileRange?alt=com.azure.storage.file.share.models.ShareFileRange&text=ShareFileRange\" data-throw-if-not-resolved=\"False\" />"
- description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be thrown."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Response<ShareFileProperties> downloadToFileWithResponse(String downloadFilePath, ShareFileRange range, Duration timeout, Context context)"
desc: "Downloads a file from the system, including its metadata and properties into a file specified by the path.\n\nThe file will be created and must not exist, if the file already exists a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"FileAlreadyExistsException\"></xref> will be thrown.\n\n**Code Samples**\n\nDownload the file from 1024 to 2048 bytes to current folder.\n\n```java\nResponse<ShareFileProperties> response =\n fileClient.downloadToFileWithResponse(\"somelocalfilepath\", new ShareFileRange(1024, 2047L),\n Duration.ofSeconds(1), Context.NONE);\n if (Files.exists(Paths.get(\"somelocalfilepath\"))) {\n System.out.println(\"Complete downloading the file with status code \" + response.getStatusCode());\n }\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/get-file"
returns:
description: "The response of the file properties."
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.storage.file.share.models.ShareFileProperties?alt=com.azure.storage.file.share.models.ShareFileProperties&text=ShareFileProperties\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.storage.file.share.ShareFileClient.downloadWithResponse(java.io.OutputStream,com.azure.storage.file.share.models.ShareFileRange,java.lang.Boolean,com.azure.storage.file.share.models.ShareRequestConditions,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareFileClient.downloadWithResponse(OutputStream stream, ShareFileRange range, Boolean rangeGetContentMD5, ShareRequestConditions requestConditions, Duration timeout, Context context)"
name: "downloadWithResponse(OutputStream stream, ShareFileRange range, Boolean rangeGetContentMD5, ShareRequestConditions requestConditions, Duration timeout, Context context)"
nameWithType: "ShareFileClient.downloadWithResponse(OutputStream stream, ShareFileRange range, Boolean rangeGetContentMD5, ShareRequestConditions requestConditions, Duration timeout, Context context)"
summary: "Downloads a file from the system, including its metadata and properties"
parameters:
- description: "A non-null <xref uid=\"java.io.OutputStream\" data-throw-if-not-resolved=\"false\" data-raw-source=\"OutputStream\"></xref> where the downloaded data will be written."
name: "stream"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/io/OutputStream.html\">OutputStream</a>"
- description: "Optional byte range which returns file data only from the specified range."
name: "range"
type: "<xref href=\"com.azure.storage.file.share.models.ShareFileRange?alt=com.azure.storage.file.share.models.ShareFileRange&text=ShareFileRange\" data-throw-if-not-resolved=\"False\" />"
- description: "Optional boolean which the service returns the MD5 hash for the range when it sets to\n true, as long as the range is less than or equal to 4 MB in size."
name: "rangeGetContentMD5"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Boolean.html\">Boolean</a>"
- description: "<xref uid=\"com.azure.storage.file.share.models.ShareRequestConditions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareRequestConditions\"></xref>"
name: "requestConditions"
type: "<xref href=\"com.azure.storage.file.share.models.ShareRequestConditions?alt=com.azure.storage.file.share.models.ShareRequestConditions&text=ShareRequestConditions\" data-throw-if-not-resolved=\"False\" />"
- description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be thrown."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public ShareFileDownloadResponse downloadWithResponse(OutputStream stream, ShareFileRange range, Boolean rangeGetContentMD5, ShareRequestConditions requestConditions, Duration timeout, Context context)"
desc: "Downloads a file from the system, including its metadata and properties\n\n**Code Samples**\n\nDownload the file from 1024 to 2048 bytes with its metadata and properties and without the contentMD5.\n\n```java\ntry {\n ByteArrayOutputStream stream = new ByteArrayOutputStream();\n ShareRequestConditions requestConditions = new ShareRequestConditions().setLeaseId(leaseId);\n Response<Void> response = fileClient.downloadWithResponse(stream, new ShareFileRange(1024, 2047L), false,\n requestConditions, Duration.ofSeconds(30), new Context(key1, value1));\n\n System.out.printf(\"Completed downloading file with status code %d%n\", response.getStatusCode());\n System.out.printf(\"Content of the file is: %n%s%n\",\n new String(stream.toByteArray(), StandardCharsets.UTF_8));\n } catch (Throwable throwable) {\n System.err.printf(\"Downloading failed with exception. Message: %s%n\", throwable.getMessage());\n }\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/get-file"
returns:
description: "A response containing the headers and response status code"
type: "<xref href=\"com.azure.storage.file.share.models.ShareFileDownloadResponse?alt=com.azure.storage.file.share.models.ShareFileDownloadResponse&text=ShareFileDownloadResponse\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.storage.file.share.ShareFileClient.downloadWithResponse(java.io.OutputStream,com.azure.storage.file.share.models.ShareFileRange,java.lang.Boolean,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareFileClient.downloadWithResponse(OutputStream stream, ShareFileRange range, Boolean rangeGetContentMD5, Duration timeout, Context context)"
name: "downloadWithResponse(OutputStream stream, ShareFileRange range, Boolean rangeGetContentMD5, Duration timeout, Context context)"
nameWithType: "ShareFileClient.downloadWithResponse(OutputStream stream, ShareFileRange range, Boolean rangeGetContentMD5, Duration timeout, Context context)"
summary: "Downloads a file from the system, including its metadata and properties"
parameters:
- description: "A non-null <xref uid=\"java.io.OutputStream\" data-throw-if-not-resolved=\"false\" data-raw-source=\"OutputStream\"></xref> where the downloaded data will be written."
name: "stream"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/io/OutputStream.html\">OutputStream</a>"
- description: "Optional byte range which returns file data only from the specified range."
name: "range"
type: "<xref href=\"com.azure.storage.file.share.models.ShareFileRange?alt=com.azure.storage.file.share.models.ShareFileRange&text=ShareFileRange\" data-throw-if-not-resolved=\"False\" />"
- description: "Optional boolean which the service returns the MD5 hash for the range when it sets to\n true, as long as the range is less than or equal to 4 MB in size."
name: "rangeGetContentMD5"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Boolean.html\">Boolean</a>"
- description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be thrown."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public ShareFileDownloadResponse downloadWithResponse(OutputStream stream, ShareFileRange range, Boolean rangeGetContentMD5, Duration timeout, Context context)"
desc: "Downloads a file from the system, including its metadata and properties\n\n**Code Samples**\n\nDownload the file from 1024 to 2048 bytes with its metadata and properties and without the contentMD5.\n\n```java\ntry {\n ByteArrayOutputStream stream = new ByteArrayOutputStream();\n Response<Void> response = fileClient.downloadWithResponse(stream, new ShareFileRange(1024, 2047L), false,\n Duration.ofSeconds(30), new Context(key1, value1));\n\n System.out.printf(\"Completed downloading file with status code %d%n\", response.getStatusCode());\n System.out.printf(\"Content of the file is: %n%s%n\",\n new String(stream.toByteArray(), StandardCharsets.UTF_8));\n } catch (Throwable throwable) {\n System.err.printf(\"Downloading failed with exception. Message: %s%n\", throwable.getMessage());\n }\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/get-file"
returns:
description: "A response containing the headers and response status code"
type: "<xref href=\"com.azure.storage.file.share.models.ShareFileDownloadResponse?alt=com.azure.storage.file.share.models.ShareFileDownloadResponse&text=ShareFileDownloadResponse\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.storage.file.share.ShareFileClient.downloadWithResponse(java.io.OutputStream,com.azure.storage.file.share.options.ShareFileDownloadOptions,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareFileClient.downloadWithResponse(OutputStream stream, ShareFileDownloadOptions options, Duration timeout, Context context)"
name: "downloadWithResponse(OutputStream stream, ShareFileDownloadOptions options, Duration timeout, Context context)"
nameWithType: "ShareFileClient.downloadWithResponse(OutputStream stream, ShareFileDownloadOptions options, Duration timeout, Context context)"
summary: "Downloads a file from the system, including its metadata and properties"
parameters:
- description: "A non-null <xref uid=\"java.io.OutputStream\" data-throw-if-not-resolved=\"false\" data-raw-source=\"OutputStream\"></xref> where the downloaded data will be written."
name: "stream"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/io/OutputStream.html\">OutputStream</a>"
- description: "<xref uid=\"com.azure.storage.file.share.options.ShareFileDownloadOptions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareFileDownloadOptions\"></xref>"
name: "options"
type: "<xref href=\"com.azure.storage.file.share.options.ShareFileDownloadOptions?alt=com.azure.storage.file.share.options.ShareFileDownloadOptions&text=ShareFileDownloadOptions\" data-throw-if-not-resolved=\"False\" />"
- description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be thrown."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public ShareFileDownloadResponse downloadWithResponse(OutputStream stream, ShareFileDownloadOptions options, Duration timeout, Context context)"
desc: "Downloads a file from the system, including its metadata and properties\n\n**Code Samples**\n\nDownload the file from 1024 to 2048 bytes with its metadata and properties and without the contentMD5.\n\n```java\ntry {\n ByteArrayOutputStream stream = new ByteArrayOutputStream();\n ShareRequestConditions requestConditions = new ShareRequestConditions().setLeaseId(leaseId);\n ShareFileRange range = new ShareFileRange(1024, 2047L);\n DownloadRetryOptions retryOptions = new DownloadRetryOptions().setMaxRetryRequests(3);\n ShareFileDownloadOptions options = new ShareFileDownloadOptions().setRange(range)\n .setRequestConditions(requestConditions)\n .setRangeContentMd5Requested(false)\n .setRetryOptions(retryOptions);\n Response<Void> response = fileClient.downloadWithResponse(stream, options, Duration.ofSeconds(30),\n new Context(key1, value1));\n\n System.out.printf(\"Completed downloading file with status code %d%n\", response.getStatusCode());\n System.out.printf(\"Content of the file is: %n%s%n\",\n new String(stream.toByteArray(), StandardCharsets.UTF_8));\n } catch (Throwable throwable) {\n System.err.printf(\"Downloading failed with exception. Message: %s%n\", throwable.getMessage());\n }\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/get-file"
returns:
description: "A response containing the headers and response status code"
type: "<xref href=\"com.azure.storage.file.share.models.ShareFileDownloadResponse?alt=com.azure.storage.file.share.models.ShareFileDownloadResponse&text=ShareFileDownloadResponse\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.storage.file.share.ShareFileClient.exists()"
fullName: "com.azure.storage.file.share.ShareFileClient.exists()"
name: "exists()"
nameWithType: "ShareFileClient.exists()"
summary: "Determines if the file this client represents exists in the cloud."
syntax: "public Boolean exists()"
desc: "Determines if the file this client represents exists in the cloud.\n\n**Code Samples**\n\n```java\nSystem.out.printf(\"Exists? %b%n\", client.exists());\n```"
returns:
description: "Flag indicating existence of the file."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Boolean.html\">Boolean</a>"
- uid: "com.azure.storage.file.share.ShareFileClient.existsWithResponse(java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareFileClient.existsWithResponse(Duration timeout, Context context)"
name: "existsWithResponse(Duration timeout, Context context)"
nameWithType: "ShareFileClient.existsWithResponse(Duration timeout, Context context)"
summary: "Determines if the file this client represents exists in the cloud."
parameters:
- description: "An optional timeout value beyond which a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be raised."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Response<Boolean> existsWithResponse(Duration timeout, Context context)"
desc: "Determines if the file this client represents exists in the cloud.\n\n**Code Samples**\n\n```java\nContext context = new Context(\"Key\", \"Value\");\n System.out.printf(\"Exists? %b%n\", client.existsWithResponse(timeout, context).getValue());\n```"
returns:
description: "Flag indicating existence of the file."
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" />&lt;<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Boolean.html\">Boolean</a>&gt;"
- uid: "com.azure.storage.file.share.ShareFileClient.forceCloseAllHandles(java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareFileClient.forceCloseAllHandles(Duration timeout, Context context)"
name: "forceCloseAllHandles(Duration timeout, Context context)"
nameWithType: "ShareFileClient.forceCloseAllHandles(Duration timeout, Context context)"
summary: "Closes all handles opened on the file at the service."
parameters:
- description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be thrown."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public CloseHandlesInfo forceCloseAllHandles(Duration timeout, Context context)"
desc: "Closes all handles opened on the file at the service.\n\n**Code Samples**\n\nForce close all handles.\n\n```java\nCloseHandlesInfo closeHandlesInfo = fileClient.forceCloseAllHandles(Duration.ofSeconds(30), Context.NONE);\n System.out.printf(\"Closed %d open handles on the file%n\", closeHandlesInfo.getClosedHandles());\n System.out.printf(\"Failed to close %d open handles on the file%n\", closeHandlesInfo.getFailedHandles());\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/force-close-handles"
returns:
description: "Information about the closed handles"
type: "<xref href=\"com.azure.storage.file.share.models.CloseHandlesInfo?alt=com.azure.storage.file.share.models.CloseHandlesInfo&text=CloseHandlesInfo\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.storage.file.share.ShareFileClient.forceCloseHandle(java.lang.String)"
fullName: "com.azure.storage.file.share.ShareFileClient.forceCloseHandle(String handleId)"
name: "forceCloseHandle(String handleId)"
nameWithType: "ShareFileClient.forceCloseHandle(String handleId)"
summary: "Closes a handle on the file at the service."
parameters:
- description: "Handle ID to be closed."
name: "handleId"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public CloseHandlesInfo forceCloseHandle(String handleId)"
desc: "Closes a handle on the file at the service. This is intended to be used alongside <xref uid=\"com.azure.storage.file.share.ShareFileClient.listHandles()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#listHandles()\"></xref>.\n\n**Code Samples**\n\nForce close handles returned by list handles.\n\n```java\nfileClient.listHandles().forEach(handleItem -> {\n fileClient.forceCloseHandle(handleItem.getHandleId());\n System.out.printf(\"Closed handle %s on resource %s%n\", handleItem.getHandleId(), handleItem.getPath());\n });\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/force-close-handles"
returns:
description: "Information about the closed handles."
type: "<xref href=\"com.azure.storage.file.share.models.CloseHandlesInfo?alt=com.azure.storage.file.share.models.CloseHandlesInfo&text=CloseHandlesInfo\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.storage.file.share.ShareFileClient.forceCloseHandleWithResponse(java.lang.String,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareFileClient.forceCloseHandleWithResponse(String handleId, Duration timeout, Context context)"
name: "forceCloseHandleWithResponse(String handleId, Duration timeout, Context context)"
nameWithType: "ShareFileClient.forceCloseHandleWithResponse(String handleId, Duration timeout, Context context)"
summary: "Closes a handle on the file at the service."
parameters:
- description: "Handle ID to be closed."
name: "handleId"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be thrown."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Response<CloseHandlesInfo> forceCloseHandleWithResponse(String handleId, Duration timeout, Context context)"
desc: "Closes a handle on the file at the service. This is intended to be used alongside <xref uid=\"com.azure.storage.file.share.ShareFileClient.listHandles()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#listHandles()\"></xref>.\n\n**Code Samples**\n\nForce close handles returned by list handles.\n\n```java\nfileClient.listHandles().forEach(handleItem -> {\n Response<CloseHandlesInfo> closeResponse = fileClient\n .forceCloseHandleWithResponse(handleItem.getHandleId(), Duration.ofSeconds(30), Context.NONE);\n System.out.printf(\"Closing handle %s on resource %s completed with status code %d%n\",\n handleItem.getHandleId(), handleItem.getPath(), closeResponse.getStatusCode());\n });\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/force-close-handles"
returns:
description: "A response that contains information about the closed handles, headers and response status code."
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.storage.file.share.models.CloseHandlesInfo?alt=com.azure.storage.file.share.models.CloseHandlesInfo&text=CloseHandlesInfo\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.storage.file.share.ShareFileClient.generateSas(com.azure.storage.file.share.sas.ShareServiceSasSignatureValues)"
fullName: "com.azure.storage.file.share.ShareFileClient.generateSas(ShareServiceSasSignatureValues shareServiceSasSignatureValues)"
name: "generateSas(ShareServiceSasSignatureValues shareServiceSasSignatureValues)"
nameWithType: "ShareFileClient.generateSas(ShareServiceSasSignatureValues shareServiceSasSignatureValues)"
summary: "Generates a service SAS for the file using the specified <xref uid=\"com.azure.storage.file.share.sas.ShareServiceSasSignatureValues\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareServiceSasSignatureValues\"></xref>"
parameters:
- description: "<xref uid=\"com.azure.storage.file.share.sas.ShareServiceSasSignatureValues\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareServiceSasSignatureValues\"></xref>"
name: "shareServiceSasSignatureValues"
type: "<xref href=\"com.azure.storage.file.share.sas.ShareServiceSasSignatureValues?alt=com.azure.storage.file.share.sas.ShareServiceSasSignatureValues&text=ShareServiceSasSignatureValues\" data-throw-if-not-resolved=\"False\" />"
syntax: "public String generateSas(ShareServiceSasSignatureValues shareServiceSasSignatureValues)"
desc: "Generates a service SAS for the file using the specified <xref uid=\"com.azure.storage.file.share.sas.ShareServiceSasSignatureValues\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareServiceSasSignatureValues\"></xref>\n\nNote : The client must be authenticated via <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"StorageSharedKeyCredential\"></xref>\n\nSee <xref uid=\"com.azure.storage.file.share.sas.ShareServiceSasSignatureValues\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareServiceSasSignatureValues\"></xref> for more information on how to construct a service SAS.\n\n**Code Samples**\n\n```java\nOffsetDateTime expiryTime = OffsetDateTime.now().plusDays(1);\n ShareFileSasPermission permission = new ShareFileSasPermission().setReadPermission(true);\n\n ShareServiceSasSignatureValues values = new ShareServiceSasSignatureValues(expiryTime, permission)\n .setStartTime(OffsetDateTime.now());\n\n shareFileClient.generateSas(values); // Client must be authenticated via StorageSharedKeyCredential\n```"
returns:
description: "A <code>String</code> representing the SAS query parameters."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- uid: "com.azure.storage.file.share.ShareFileClient.generateSas(com.azure.storage.file.share.sas.ShareServiceSasSignatureValues,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareFileClient.generateSas(ShareServiceSasSignatureValues shareServiceSasSignatureValues, Context context)"
name: "generateSas(ShareServiceSasSignatureValues shareServiceSasSignatureValues, Context context)"
nameWithType: "ShareFileClient.generateSas(ShareServiceSasSignatureValues shareServiceSasSignatureValues, Context context)"
summary: "Generates a service SAS for the file using the specified <xref uid=\"com.azure.storage.file.share.sas.ShareServiceSasSignatureValues\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareServiceSasSignatureValues\"></xref>"
parameters:
- description: "<xref uid=\"com.azure.storage.file.share.sas.ShareServiceSasSignatureValues\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareServiceSasSignatureValues\"></xref>"
name: "shareServiceSasSignatureValues"
type: "<xref href=\"com.azure.storage.file.share.sas.ShareServiceSasSignatureValues?alt=com.azure.storage.file.share.sas.ShareServiceSasSignatureValues&text=ShareServiceSasSignatureValues\" data-throw-if-not-resolved=\"False\" />"
- description: "Additional context that is passed through the code when generating a SAS."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public String generateSas(ShareServiceSasSignatureValues shareServiceSasSignatureValues, Context context)"
desc: "Generates a service SAS for the file using the specified <xref uid=\"com.azure.storage.file.share.sas.ShareServiceSasSignatureValues\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareServiceSasSignatureValues\"></xref>\n\nNote : The client must be authenticated via <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"StorageSharedKeyCredential\"></xref>\n\nSee <xref uid=\"com.azure.storage.file.share.sas.ShareServiceSasSignatureValues\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareServiceSasSignatureValues\"></xref> for more information on how to construct a service SAS.\n\n**Code Samples**\n\n```java\nOffsetDateTime expiryTime = OffsetDateTime.now().plusDays(1);\n ShareFileSasPermission permission = new ShareFileSasPermission().setReadPermission(true);\n\n ShareServiceSasSignatureValues values = new ShareServiceSasSignatureValues(expiryTime, permission)\n .setStartTime(OffsetDateTime.now());\n\n // Client must be authenticated via StorageSharedKeyCredential\n shareFileClient.generateSas(values, new Context(\"key\", \"value\"));\n```"
returns:
description: "A <code>String</code> representing the SAS query parameters."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- uid: "com.azure.storage.file.share.ShareFileClient.getAccountName()"
fullName: "com.azure.storage.file.share.ShareFileClient.getAccountName()"
name: "getAccountName()"
nameWithType: "ShareFileClient.getAccountName()"
summary: "Get associated account name."
syntax: "public String getAccountName()"
desc: "Get associated account name."
returns:
description: "account name associated with this storage resource."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- uid: "com.azure.storage.file.share.ShareFileClient.getAccountUrl()"
fullName: "com.azure.storage.file.share.ShareFileClient.getAccountUrl()"
name: "getAccountUrl()"
nameWithType: "ShareFileClient.getAccountUrl()"
summary: "Get the url of the storage account."
syntax: "public String getAccountUrl()"
desc: "Get the url of the storage account."
returns:
description: "the URL of the storage account"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- uid: "com.azure.storage.file.share.ShareFileClient.getFileOutputStream()"
fullName: "com.azure.storage.file.share.ShareFileClient.getFileOutputStream()"
name: "getFileOutputStream()"
nameWithType: "ShareFileClient.getFileOutputStream()"
summary: "Creates and opens an output stream to write data to the file."
modifiers:
- "final"
syntax: "public final StorageFileOutputStream getFileOutputStream()"
desc: "Creates and opens an output stream to write data to the file. If the file already exists on the service, it will be overwritten."
returns:
description: "A <xref uid=\"com.azure.storage.file.share.StorageFileOutputStream\" data-throw-if-not-resolved=\"false\" data-raw-source=\"StorageFileOutputStream\"></xref> object used to write data to the file."
type: "<xref href=\"com.azure.storage.file.share.StorageFileOutputStream?alt=com.azure.storage.file.share.StorageFileOutputStream&text=StorageFileOutputStream\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.storage.file.share.ShareFileClient.getFileOutputStream(long)"
fullName: "com.azure.storage.file.share.ShareFileClient.getFileOutputStream(long offset)"
name: "getFileOutputStream(long offset)"
nameWithType: "ShareFileClient.getFileOutputStream(long offset)"
summary: "Creates and opens an output stream to write data to the file."
modifiers:
- "final"
parameters:
- description: "Starting point of the upload range, if <code>null</code> it will start from the beginning."
name: "offset"
type: "<xref href=\"long?alt=long&text=long\" data-throw-if-not-resolved=\"False\" />"
syntax: "public final StorageFileOutputStream getFileOutputStream(long offset)"
desc: "Creates and opens an output stream to write data to the file. If the file already exists on the service, it will be overwritten."
returns:
description: "A <xref uid=\"com.azure.storage.file.share.StorageFileOutputStream\" data-throw-if-not-resolved=\"false\" data-raw-source=\"StorageFileOutputStream\"></xref> object used to write data to the file."
type: "<xref href=\"com.azure.storage.file.share.StorageFileOutputStream?alt=com.azure.storage.file.share.StorageFileOutputStream&text=StorageFileOutputStream\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.storage.file.share.ShareFileClient.getFilePath()"
fullName: "com.azure.storage.file.share.ShareFileClient.getFilePath()"
name: "getFilePath()"
nameWithType: "ShareFileClient.getFilePath()"
summary: "Get file path of the client."
syntax: "public String getFilePath()"
desc: "Get file path of the client.\n\nGet the file path.\n\n```java\nString filePath = fileClient.getFilePath();\n System.out.println(\"The name of the file is \" + filePath);\n```"
returns:
description: "The path of the file."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- uid: "com.azure.storage.file.share.ShareFileClient.getFileUrl()"
fullName: "com.azure.storage.file.share.ShareFileClient.getFileUrl()"
name: "getFileUrl()"
nameWithType: "ShareFileClient.getFileUrl()"
summary: "Get the url of the storage file client."
syntax: "public String getFileUrl()"
desc: "Get the url of the storage file client."
returns:
description: "the URL of the storage file client."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- uid: "com.azure.storage.file.share.ShareFileClient.getHttpPipeline()"
fullName: "com.azure.storage.file.share.ShareFileClient.getHttpPipeline()"
name: "getHttpPipeline()"
nameWithType: "ShareFileClient.getHttpPipeline()"
summary: "Gets the <xref uid=\"com.azure.core.http.HttpPipeline\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HttpPipeline\"></xref> powering this client."
syntax: "public HttpPipeline getHttpPipeline()"
desc: "Gets the <xref uid=\"com.azure.core.http.HttpPipeline\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HttpPipeline\"></xref> powering this client."
returns:
description: "The pipeline."
type: "<xref href=\"com.azure.core.http.HttpPipeline?alt=com.azure.core.http.HttpPipeline&text=HttpPipeline\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.storage.file.share.ShareFileClient.getProperties()"
fullName: "com.azure.storage.file.share.ShareFileClient.getProperties()"
name: "getProperties()"
nameWithType: "ShareFileClient.getProperties()"
summary: "Retrieves the properties of the storage account's file."
syntax: "public ShareFileProperties getProperties()"
desc: "Retrieves the properties of the storage account's file. The properties include file metadata, last modified date, is server encrypted, and eTag.\n\n**Code Samples**\n\nRetrieve file properties\n\n```java\nShareFileProperties properties = fileClient.getProperties();\n System.out.printf(\"File latest modified date is %s.\", properties.getLastModified());\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/get-file-properties"
returns:
description: "<xref uid=\"com.azure.storage.file.share.models.ShareFileProperties\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Storage file properties\"></xref>"
type: "<xref href=\"com.azure.storage.file.share.models.ShareFileProperties?alt=com.azure.storage.file.share.models.ShareFileProperties&text=ShareFileProperties\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.storage.file.share.ShareFileClient.getPropertiesWithResponse(com.azure.storage.file.share.models.ShareRequestConditions,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareFileClient.getPropertiesWithResponse(ShareRequestConditions requestConditions, Duration timeout, Context context)"
name: "getPropertiesWithResponse(ShareRequestConditions requestConditions, Duration timeout, Context context)"
nameWithType: "ShareFileClient.getPropertiesWithResponse(ShareRequestConditions requestConditions, Duration timeout, Context context)"
summary: "Retrieves the properties of the storage account's file."
parameters:
- description: "<xref uid=\"com.azure.storage.file.share.models.ShareRequestConditions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareRequestConditions\"></xref>"
name: "requestConditions"
type: "<xref href=\"com.azure.storage.file.share.models.ShareRequestConditions?alt=com.azure.storage.file.share.models.ShareRequestConditions&text=ShareRequestConditions\" data-throw-if-not-resolved=\"False\" />"
- description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be thrown."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Response<ShareFileProperties> getPropertiesWithResponse(ShareRequestConditions requestConditions, Duration timeout, Context context)"
desc: "Retrieves the properties of the storage account's file. The properties include file metadata, last modified date, is server encrypted, and eTag.\n\n**Code Samples**\n\nRetrieve file properties\n\n```java\nShareRequestConditions requestConditions = new ShareRequestConditions().setLeaseId(leaseId);\n Response<ShareFileProperties> response = fileClient.getPropertiesWithResponse(requestConditions,\n Duration.ofSeconds(1), new Context(key1, value1));\n System.out.printf(\"File latest modified date is %s.\", response.getValue().getLastModified());\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/get-file-properties"
returns:
description: "A response containing the <xref uid=\"com.azure.storage.file.share.models.ShareFileProperties\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Storage file properties\"></xref> with headers and\n status code."
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.storage.file.share.models.ShareFileProperties?alt=com.azure.storage.file.share.models.ShareFileProperties&text=ShareFileProperties\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.storage.file.share.ShareFileClient.getPropertiesWithResponse(java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareFileClient.getPropertiesWithResponse(Duration timeout, Context context)"
name: "getPropertiesWithResponse(Duration timeout, Context context)"
nameWithType: "ShareFileClient.getPropertiesWithResponse(Duration timeout, Context context)"
summary: "Retrieves the properties of the storage account's file."
parameters:
- description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be thrown."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Response<ShareFileProperties> getPropertiesWithResponse(Duration timeout, Context context)"
desc: "Retrieves the properties of the storage account's file. The properties include file metadata, last modified date, is server encrypted, and eTag.\n\n**Code Samples**\n\nRetrieve file properties\n\n```java\nResponse<ShareFileProperties> response = fileClient.getPropertiesWithResponse(\n Duration.ofSeconds(1), new Context(key1, value1));\n System.out.printf(\"File latest modified date is %s.\", response.getValue().getLastModified());\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/get-file-properties"
returns:
description: "A response containing the <xref uid=\"com.azure.storage.file.share.models.ShareFileProperties\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Storage file properties\"></xref> with headers and\n status code."
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.storage.file.share.models.ShareFileProperties?alt=com.azure.storage.file.share.models.ShareFileProperties&text=ShareFileProperties\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.storage.file.share.ShareFileClient.getServiceVersion()"
fullName: "com.azure.storage.file.share.ShareFileClient.getServiceVersion()"
name: "getServiceVersion()"
nameWithType: "ShareFileClient.getServiceVersion()"
summary: "Gets the service version the client is using."
syntax: "public ShareServiceVersion getServiceVersion()"
desc: "Gets the service version the client is using."
returns:
description: "the service version the client is using."
type: "<xref href=\"com.azure.storage.file.share.ShareServiceVersion?alt=com.azure.storage.file.share.ShareServiceVersion&text=ShareServiceVersion\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.storage.file.share.ShareFileClient.getShareName()"
fullName: "com.azure.storage.file.share.ShareFileClient.getShareName()"
name: "getShareName()"
nameWithType: "ShareFileClient.getShareName()"
summary: "Get the share name of file client."
syntax: "public String getShareName()"
desc: "Get the share name of file client.\n\nGet the share name.\n\n```java\nString shareName = fileClient.getShareName();\n System.out.println(\"The share name of the directory is \" + shareName);\n```"
returns:
description: "The share name of the file."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- uid: "com.azure.storage.file.share.ShareFileClient.getShareSnapshotId()"
fullName: "com.azure.storage.file.share.ShareFileClient.getShareSnapshotId()"
name: "getShareSnapshotId()"
nameWithType: "ShareFileClient.getShareSnapshotId()"
summary: "Get snapshot id which attached to <xref uid=\"com.azure.storage.file.share.ShareFileClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareFileClient\"></xref>."
syntax: "public String getShareSnapshotId()"
desc: "Get snapshot id which attached to <xref uid=\"com.azure.storage.file.share.ShareFileClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareFileClient\"></xref>. Return `null` if no snapshot id attached.\n\n**Code Samples**\n\nGet the share snapshot id.\n\n```java\nOffsetDateTime currentTime = OffsetDateTime.of(LocalDateTime.now(), ZoneOffset.UTC);\n ShareFileClient fileClient = new ShareFileClientBuilder()\n .endpoint(\"https://${accountName}.file.core.windows.net\")\n .sasToken(\"${SASToken}\")\n .shareName(\"myshare\")\n .resourcePath(\"myfile\")\n .snapshot(currentTime.toString())\n .buildFileClient();\n\n System.out.printf(\"Snapshot ID: %s%n\", fileClient.getShareSnapshotId());\n```"
returns:
description: "The snapshot id which is a unique <code>DateTime</code> value that identifies the share snapshot to its base\n share."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- uid: "com.azure.storage.file.share.ShareFileClient.listHandles()"
fullName: "com.azure.storage.file.share.ShareFileClient.listHandles()"
name: "listHandles()"
nameWithType: "ShareFileClient.listHandles()"
summary: "List of open handles on a file."
syntax: "public PagedIterable<HandleItem> listHandles()"
desc: "List of open handles on a file.\n\n**Code Samples**\n\nList all handles for the file client.\n\n```java\nfileClient.listHandles()\n .forEach(handleItem -> System.out.printf(\"List handles completed with handleId %s\",\n handleItem.getHandleId()));\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/list-handles"
returns:
description: "<xref uid=\"com.azure.storage.file.share.models.HandleItem\" data-throw-if-not-resolved=\"false\" data-raw-source=\"handles\"></xref> in the files that satisfy the requirements"
type: "<xref href=\"com.azure.core.http.rest.PagedIterable?alt=com.azure.core.http.rest.PagedIterable&text=PagedIterable\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.storage.file.share.models.HandleItem?alt=com.azure.storage.file.share.models.HandleItem&text=HandleItem\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.storage.file.share.ShareFileClient.listHandles(java.lang.Integer,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareFileClient.listHandles(Integer maxResultsPerPage, Duration timeout, Context context)"
name: "listHandles(Integer maxResultsPerPage, Duration timeout, Context context)"
nameWithType: "ShareFileClient.listHandles(Integer maxResultsPerPage, Duration timeout, Context context)"
summary: "List of open handles on a file."
parameters:
- description: "Optional max number of results returned per page"
name: "maxResultsPerPage"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html\">Integer</a>"
- description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be thrown."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public PagedIterable<HandleItem> listHandles(Integer maxResultsPerPage, Duration timeout, Context context)"
desc: "List of open handles on a file.\n\n**Code Samples**\n\nList 10 handles for the file client.\n\n```java\nfileClient.listHandles(10, Duration.ofSeconds(1), new Context(key1, value1))\n .forEach(handleItem -> System.out.printf(\"List handles completed with handleId %s\",\n handleItem.getHandleId()));\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/list-handles"
returns:
description: "<xref uid=\"com.azure.storage.file.share.models.HandleItem\" data-throw-if-not-resolved=\"false\" data-raw-source=\"handles\"></xref> in the file that satisfy the requirements"
type: "<xref href=\"com.azure.core.http.rest.PagedIterable?alt=com.azure.core.http.rest.PagedIterable&text=PagedIterable\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.storage.file.share.models.HandleItem?alt=com.azure.storage.file.share.models.HandleItem&text=HandleItem\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.storage.file.share.ShareFileClient.listRanges()"
fullName: "com.azure.storage.file.share.ShareFileClient.listRanges()"
name: "listRanges()"
nameWithType: "ShareFileClient.listRanges()"
summary: "List of valid ranges for a file."
syntax: "public PagedIterable<ShareFileRange> listRanges()"
desc: "List of valid ranges for a file.\n\n**Code Samples**\n\nList all ranges for the file client.\n\n```java\nIterable<ShareFileRange> ranges = fileClient.listRanges();\n ranges.forEach(range ->\n System.out.printf(\"List ranges completed with start: %d, end: %d\", range.getStart(), range.getEnd()));\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/list-ranges"
returns:
description: "<xref uid=\"com.azure.storage.file.share.models.ShareFileRange\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ranges\"></xref> in the files."
type: "<xref href=\"com.azure.core.http.rest.PagedIterable?alt=com.azure.core.http.rest.PagedIterable&text=PagedIterable\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.storage.file.share.models.ShareFileRange?alt=com.azure.storage.file.share.models.ShareFileRange&text=ShareFileRange\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.storage.file.share.ShareFileClient.listRanges(com.azure.storage.file.share.models.ShareFileRange,com.azure.storage.file.share.models.ShareRequestConditions,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareFileClient.listRanges(ShareFileRange range, ShareRequestConditions requestConditions, Duration timeout, Context context)"
name: "listRanges(ShareFileRange range, ShareRequestConditions requestConditions, Duration timeout, Context context)"
nameWithType: "ShareFileClient.listRanges(ShareFileRange range, ShareRequestConditions requestConditions, Duration timeout, Context context)"
summary: "List of valid ranges for a file."
parameters:
- description: "Optional byte range which returns file data only from the specified range."
name: "range"
type: "<xref href=\"com.azure.storage.file.share.models.ShareFileRange?alt=com.azure.storage.file.share.models.ShareFileRange&text=ShareFileRange\" data-throw-if-not-resolved=\"False\" />"
- description: "<xref uid=\"com.azure.storage.file.share.models.ShareRequestConditions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareRequestConditions\"></xref>"
name: "requestConditions"
type: "<xref href=\"com.azure.storage.file.share.models.ShareRequestConditions?alt=com.azure.storage.file.share.models.ShareRequestConditions&text=ShareRequestConditions\" data-throw-if-not-resolved=\"False\" />"
- description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be thrown."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public PagedIterable<ShareFileRange> listRanges(ShareFileRange range, ShareRequestConditions requestConditions, Duration timeout, Context context)"
desc: "List of valid ranges for a file.\n\n**Code Samples**\n\nList all ranges within the file range from 1KB to 2KB.\n\n```java\nShareRequestConditions requestConditions = new ShareRequestConditions().setLeaseId(leaseId);\n Iterable<ShareFileRange> ranges = fileClient.listRanges(new ShareFileRange(1024, 2048L), requestConditions,\n Duration.ofSeconds(1), new Context(key1, value1));\n ranges.forEach(range ->\n System.out.printf(\"List ranges completed with start: %d, end: %d\", range.getStart(), range.getEnd()));\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/list-ranges"
returns:
description: "<xref uid=\"com.azure.storage.file.share.models.ShareFileRange\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ranges\"></xref> in the files that satisfy the requirements"
type: "<xref href=\"com.azure.core.http.rest.PagedIterable?alt=com.azure.core.http.rest.PagedIterable&text=PagedIterable\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.storage.file.share.models.ShareFileRange?alt=com.azure.storage.file.share.models.ShareFileRange&text=ShareFileRange\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.storage.file.share.ShareFileClient.listRanges(com.azure.storage.file.share.models.ShareFileRange,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareFileClient.listRanges(ShareFileRange range, Duration timeout, Context context)"
name: "listRanges(ShareFileRange range, Duration timeout, Context context)"
nameWithType: "ShareFileClient.listRanges(ShareFileRange range, Duration timeout, Context context)"
summary: "List of valid ranges for a file."
parameters:
- description: "Optional byte range which returns file data only from the specified range."
name: "range"
type: "<xref href=\"com.azure.storage.file.share.models.ShareFileRange?alt=com.azure.storage.file.share.models.ShareFileRange&text=ShareFileRange\" data-throw-if-not-resolved=\"False\" />"
- description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be thrown."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public PagedIterable<ShareFileRange> listRanges(ShareFileRange range, Duration timeout, Context context)"
desc: "List of valid ranges for a file.\n\n**Code Samples**\n\nList all ranges within the file range from 1KB to 2KB.\n\n```java\nIterable<ShareFileRange> ranges = fileClient.listRanges(new ShareFileRange(1024, 2048L), Duration.ofSeconds(1),\n new Context(key1, value1));\n ranges.forEach(range ->\n System.out.printf(\"List ranges completed with start: %d, end: %d\", range.getStart(), range.getEnd()));\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/list-ranges"
returns:
description: "<xref uid=\"com.azure.storage.file.share.models.ShareFileRange\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ranges\"></xref> in the files that satisfy the requirements"
type: "<xref href=\"com.azure.core.http.rest.PagedIterable?alt=com.azure.core.http.rest.PagedIterable&text=PagedIterable\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.storage.file.share.models.ShareFileRange?alt=com.azure.storage.file.share.models.ShareFileRange&text=ShareFileRange\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.storage.file.share.ShareFileClient.listRangesDiff(java.lang.String)"
fullName: "com.azure.storage.file.share.ShareFileClient.listRangesDiff(String previousSnapshot)"
name: "listRangesDiff(String previousSnapshot)"
nameWithType: "ShareFileClient.listRangesDiff(String previousSnapshot)"
summary: "List of valid ranges for a file."
parameters:
- description: "Specifies that the response will contain only ranges that were changed between target\n file and previous snapshot. Changed ranges include both updated and cleared ranges. The target file may be a\n snapshot, as long as the snapshot specified by previousSnapshot is the older of the two."
name: "previousSnapshot"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public ShareFileRangeList listRangesDiff(String previousSnapshot)"
desc: "List of valid ranges for a file.\n\n**Code Samples**\n\nList all ranges within the file range from 1KB to 2KB.\n\n```java\nShareFileRangeList rangeList = fileClient.listRangesDiff(\"previoussnapshot\");\n System.out.println(\"Valid Share File Ranges are:\");\n for (FileRange range : rangeList.getRanges()) {\n System.out.printf(\"Start: %s, End: %s%n\", range.getStart(), range.getEnd());\n }\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/list-ranges"
returns:
description: "<xref uid=\"com.azure.storage.file.share.models.ShareFileRange\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ranges\"></xref> in the files that satisfy the requirements"
type: "<xref href=\"com.azure.storage.file.share.models.ShareFileRangeList?alt=com.azure.storage.file.share.models.ShareFileRangeList&text=ShareFileRangeList\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.storage.file.share.ShareFileClient.listRangesDiffWithResponse(com.azure.storage.file.share.options.ShareFileListRangesDiffOptions,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareFileClient.listRangesDiffWithResponse(ShareFileListRangesDiffOptions options, Duration timeout, Context context)"
name: "listRangesDiffWithResponse(ShareFileListRangesDiffOptions options, Duration timeout, Context context)"
nameWithType: "ShareFileClient.listRangesDiffWithResponse(ShareFileListRangesDiffOptions options, Duration timeout, Context context)"
summary: "List of valid ranges for a file."
parameters:
- description: "<xref uid=\"com.azure.storage.file.share.options.ShareFileListRangesDiffOptions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareFileListRangesDiffOptions\"></xref>"
name: "options"
type: "<xref href=\"com.azure.storage.file.share.options.ShareFileListRangesDiffOptions?alt=com.azure.storage.file.share.options.ShareFileListRangesDiffOptions&text=ShareFileListRangesDiffOptions\" data-throw-if-not-resolved=\"False\" />"
- description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be thrown."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Response<ShareFileRangeList> listRangesDiffWithResponse(ShareFileListRangesDiffOptions options, Duration timeout, Context context)"
desc: "List of valid ranges for a file.\n\n**Code Samples**\n\nList all ranges within the file range from 1KB to 2KB.\n\n```java\nShareFileRangeList rangeList = fileClient.listRangesDiffWithResponse(\n new ShareFileListRangesDiffOptions(\"previoussnapshot\")\n .setRange(new ShareFileRange(1024, 2048L)), Duration.ofSeconds(1), new Context(key1, value1)).getValue();\n System.out.println(\"Valid Share File Ranges are:\");\n for (FileRange range : rangeList.getRanges()) {\n System.out.printf(\"Start: %s, End: %s%n\", range.getStart(), range.getEnd());\n }\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/list-ranges"
returns:
description: "<xref uid=\"com.azure.storage.file.share.models.ShareFileRange\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ranges\"></xref> in the files that satisfy the requirements"
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.storage.file.share.models.ShareFileRangeList?alt=com.azure.storage.file.share.models.ShareFileRangeList&text=ShareFileRangeList\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.storage.file.share.ShareFileClient.openInputStream()"
fullName: "com.azure.storage.file.share.ShareFileClient.openInputStream()"
name: "openInputStream()"
nameWithType: "ShareFileClient.openInputStream()"
summary: "Opens a file input stream to download the file."
modifiers:
- "final"
syntax: "public final StorageFileInputStream openInputStream()"
desc: "Opens a file input stream to download the file."
returns:
description: "An <code>InputStream</code> object that represents the stream to use for reading from the file."
type: "<xref href=\"com.azure.storage.file.share.StorageFileInputStream?alt=com.azure.storage.file.share.StorageFileInputStream&text=StorageFileInputStream\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.storage.file.share.ShareFileClient.openInputStream(com.azure.storage.file.share.models.ShareFileRange)"
fullName: "com.azure.storage.file.share.ShareFileClient.openInputStream(ShareFileRange range)"
name: "openInputStream(ShareFileRange range)"
nameWithType: "ShareFileClient.openInputStream(ShareFileRange range)"
summary: "Opens a file input stream to download the specified range of the file."
modifiers:
- "final"
parameters:
- description: "<xref uid=\"com.azure.storage.file.share.models.ShareFileRange\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareFileRange\"></xref>"
name: "range"
type: "<xref href=\"com.azure.storage.file.share.models.ShareFileRange?alt=com.azure.storage.file.share.models.ShareFileRange&text=ShareFileRange\" data-throw-if-not-resolved=\"False\" />"
syntax: "public final StorageFileInputStream openInputStream(ShareFileRange range)"
desc: "Opens a file input stream to download the specified range of the file."
returns:
description: "An <code>InputStream</code> object that represents the stream to use for reading from the file."
type: "<xref href=\"com.azure.storage.file.share.StorageFileInputStream?alt=com.azure.storage.file.share.StorageFileInputStream&text=StorageFileInputStream\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.storage.file.share.ShareFileClient.rename(java.lang.String)"
fullName: "com.azure.storage.file.share.ShareFileClient.rename(String destinationPath)"
name: "rename(String destinationPath)"
nameWithType: "ShareFileClient.rename(String destinationPath)"
summary: "Moves the file to another location within the share."
parameters:
- description: "Relative path from the share to rename the file to."
name: "destinationPath"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public ShareFileClient rename(String destinationPath)"
desc: "Moves the file to another location within the share. For more information see the [Azure Docs][].\n\n**Code Samples**\n\n```java\nShareFileClient renamedClient = client.rename(destinationPath);\n System.out.println(\"File Client has been renamed\");\n```\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/rename-file"
returns:
description: "A <xref uid=\"com.azure.storage.file.share.ShareFileClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareFileClient\"></xref> used to interact with the new file created."
type: "<xref href=\"com.azure.storage.file.share.ShareFileClient?alt=com.azure.storage.file.share.ShareFileClient&text=ShareFileClient\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.storage.file.share.ShareFileClient.renameWithResponse(com.azure.storage.file.share.options.ShareFileRenameOptions,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareFileClient.renameWithResponse(ShareFileRenameOptions options, Duration timeout, Context context)"
name: "renameWithResponse(ShareFileRenameOptions options, Duration timeout, Context context)"
nameWithType: "ShareFileClient.renameWithResponse(ShareFileRenameOptions options, Duration timeout, Context context)"
summary: "Moves the file to another location within the share."
parameters:
- description: "<xref uid=\"com.azure.storage.file.share.options.ShareFileRenameOptions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareFileRenameOptions\"></xref>"
name: "options"
type: "<xref href=\"com.azure.storage.file.share.options.ShareFileRenameOptions?alt=com.azure.storage.file.share.options.ShareFileRenameOptions&text=ShareFileRenameOptions\" data-throw-if-not-resolved=\"False\" />"
- description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be thrown."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Response<ShareFileClient> renameWithResponse(ShareFileRenameOptions options, Duration timeout, Context context)"
desc: "Moves the file to another location within the share. For more information see the [Azure Docs][].\n\n**Code Samples**\n\n```java\nFileSmbProperties smbProperties = new FileSmbProperties()\n .setNtfsFileAttributes(EnumSet.of(NtfsFileAttributes.READ_ONLY))\n .setFileCreationTime(OffsetDateTime.now())\n .setFileLastWriteTime(OffsetDateTime.now())\n .setFilePermissionKey(\"filePermissionKey\");\n ShareFileRenameOptions options = new ShareFileRenameOptions(destinationPath)\n .setDestinationRequestConditions(new ShareRequestConditions().setLeaseId(leaseId))\n .setSourceRequestConditions(new ShareRequestConditions().setLeaseId(leaseId))\n .setIgnoreReadOnly(false)\n .setReplaceIfExists(false)\n .setFilePermission(\"filePermission\")\n .setSmbProperties(smbProperties);\n\n ShareFileClient newRenamedClient = client.renameWithResponse(options, timeout, new Context(key1, value1))\n .getValue();\n System.out.println(\"File Client has been renamed\");\n```\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/rename-file"
returns:
description: "A <xref uid=\"com.azure.core.http.rest.Response\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Response\"></xref> whose <xref uid=\"com.azure.core.http.rest.Response.getValue*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"value\"></xref> contains a <xref uid=\"com.azure.storage.file.share.ShareFileClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareFileClient\"></xref> used to\n interact with the file created."
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.storage.file.share.ShareFileClient?alt=com.azure.storage.file.share.ShareFileClient&text=ShareFileClient\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.storage.file.share.ShareFileClient.setMetadata(java.util.Map<java.lang.String,java.lang.String>)"
fullName: "com.azure.storage.file.share.ShareFileClient.setMetadata(Map<String,String> metadata)"
name: "setMetadata(Map<String,String> metadata)"
nameWithType: "ShareFileClient.setMetadata(Map<String,String> metadata)"
summary: "Sets the user-defined metadata to associate to the file."
parameters:
- description: "Options.Metadata to set on the file, if null is passed the metadata for the file is cleared"
name: "metadata"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/Map.html\">Map</a>&lt;<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>,<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>&gt;"
syntax: "public ShareFileMetadataInfo setMetadata(Map<String,String> metadata)"
desc: "Sets the user-defined metadata to associate to the file.\n\nIf `null` is passed for the metadata it will clear the metadata associated to the file.\n\n**Code Samples**\n\nSet the metadata to \"file:updatedMetadata\"\n\n```java\nfileClient.setMetadata(Collections.singletonMap(\"file\", \"updatedMetadata\"));\n System.out.println(\"Setting the file metadata completed.\");\n```\n\nClear the metadata of the file\n\n```java\nfileClient.setMetadata(null);\n System.out.println(\"Setting the file metadata completed.\");\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/set-file-metadata"
returns:
description: "The <xref uid=\"com.azure.storage.file.share.models.ShareFileMetadataInfo\" data-throw-if-not-resolved=\"false\" data-raw-source=\"file meta info\"></xref>"
type: "<xref href=\"com.azure.storage.file.share.models.ShareFileMetadataInfo?alt=com.azure.storage.file.share.models.ShareFileMetadataInfo&text=ShareFileMetadataInfo\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.storage.file.share.ShareFileClient.setMetadataWithResponse(java.util.Map<java.lang.String,java.lang.String>,com.azure.storage.file.share.models.ShareRequestConditions,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareFileClient.setMetadataWithResponse(Map<String,String> metadata, ShareRequestConditions requestConditions, Duration timeout, Context context)"
name: "setMetadataWithResponse(Map<String,String> metadata, ShareRequestConditions requestConditions, Duration timeout, Context context)"
nameWithType: "ShareFileClient.setMetadataWithResponse(Map<String,String> metadata, ShareRequestConditions requestConditions, Duration timeout, Context context)"
summary: "Sets the user-defined metadata to associate to the file."
parameters:
- description: "Options.Metadata to set on the file, if null is passed the metadata for the file is cleared"
name: "metadata"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/Map.html\">Map</a>&lt;<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>,<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>&gt;"
- description: "<xref uid=\"com.azure.storage.file.share.models.ShareRequestConditions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareRequestConditions\"></xref>"
name: "requestConditions"
type: "<xref href=\"com.azure.storage.file.share.models.ShareRequestConditions?alt=com.azure.storage.file.share.models.ShareRequestConditions&text=ShareRequestConditions\" data-throw-if-not-resolved=\"False\" />"
- description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be thrown."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Response<ShareFileMetadataInfo> setMetadataWithResponse(Map<String,String> metadata, ShareRequestConditions requestConditions, Duration timeout, Context context)"
desc: "Sets the user-defined metadata to associate to the file.\n\nIf `null` is passed for the metadata it will clear the metadata associated to the file.\n\n**Code Samples**\n\nSet the metadata to \"file:updatedMetadata\"\n\n```java\nShareRequestConditions requestConditions = new ShareRequestConditions().setLeaseId(leaseId);\n Response<ShareFileMetadataInfo> response = fileClient.setMetadataWithResponse(\n Collections.singletonMap(\"file\", \"updatedMetadata\"), requestConditions, Duration.ofSeconds(1),\n new Context(key1, value1));\n System.out.printf(\"Setting the file metadata completed with status code %d\", response.getStatusCode());\n```\n\nClear the metadata of the file\n\n```java\nShareRequestConditions requestConditions = new ShareRequestConditions().setLeaseId(leaseId);\n Response<ShareFileMetadataInfo> response = fileClient.setMetadataWithResponse(null, requestConditions,\n Duration.ofSeconds(1), new Context(key1, value1));\n System.out.printf(\"Setting the file metadata completed with status code %d\", response.getStatusCode());\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/set-file-metadata"
returns:
description: "Response containing the <xref uid=\"com.azure.storage.file.share.models.ShareFileMetadataInfo\" data-throw-if-not-resolved=\"false\" data-raw-source=\"file meta info\"></xref> with headers and status code"
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.storage.file.share.models.ShareFileMetadataInfo?alt=com.azure.storage.file.share.models.ShareFileMetadataInfo&text=ShareFileMetadataInfo\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.storage.file.share.ShareFileClient.setMetadataWithResponse(java.util.Map<java.lang.String,java.lang.String>,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareFileClient.setMetadataWithResponse(Map<String,String> metadata, Duration timeout, Context context)"
name: "setMetadataWithResponse(Map<String,String> metadata, Duration timeout, Context context)"
nameWithType: "ShareFileClient.setMetadataWithResponse(Map<String,String> metadata, Duration timeout, Context context)"
summary: "Sets the user-defined metadata to associate to the file."
parameters:
- description: "Options.Metadata to set on the file, if null is passed the metadata for the file is cleared"
name: "metadata"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/Map.html\">Map</a>&lt;<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>,<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>&gt;"
- description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be thrown."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Response<ShareFileMetadataInfo> setMetadataWithResponse(Map<String,String> metadata, Duration timeout, Context context)"
desc: "Sets the user-defined metadata to associate to the file.\n\nIf `null` is passed for the metadata it will clear the metadata associated to the file.\n\n**Code Samples**\n\nSet the metadata to \"file:updatedMetadata\"\n\n```java\nResponse<ShareFileMetadataInfo> response = fileClient.setMetadataWithResponse(\n Collections.singletonMap(\"file\", \"updatedMetadata\"), Duration.ofSeconds(1), new Context(key1, value1));\n System.out.printf(\"Setting the file metadata completed with status code %d\", response.getStatusCode());\n```\n\nClear the metadata of the file\n\n```java\nResponse<ShareFileMetadataInfo> response = fileClient.setMetadataWithResponse(null,\n Duration.ofSeconds(1), new Context(key1, value1));\n System.out.printf(\"Setting the file metadata completed with status code %d\", response.getStatusCode());\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/set-file-metadata"
returns:
description: "Response containing the <xref uid=\"com.azure.storage.file.share.models.ShareFileMetadataInfo\" data-throw-if-not-resolved=\"false\" data-raw-source=\"file meta info\"></xref> with headers and status code"
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.storage.file.share.models.ShareFileMetadataInfo?alt=com.azure.storage.file.share.models.ShareFileMetadataInfo&text=ShareFileMetadataInfo\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.storage.file.share.ShareFileClient.setProperties(long,com.azure.storage.file.share.models.ShareFileHttpHeaders,com.azure.storage.file.share.FileSmbProperties,java.lang.String)"
fullName: "com.azure.storage.file.share.ShareFileClient.setProperties(long newFileSize, ShareFileHttpHeaders httpHeaders, FileSmbProperties smbProperties, String filePermission)"
name: "setProperties(long newFileSize, ShareFileHttpHeaders httpHeaders, FileSmbProperties smbProperties, String filePermission)"
nameWithType: "ShareFileClient.setProperties(long newFileSize, ShareFileHttpHeaders httpHeaders, FileSmbProperties smbProperties, String filePermission)"
summary: "Sets the user-defined http<wbr>Headers to associate to the file."
parameters:
- description: "New file size of the file"
name: "newFileSize"
type: "<xref href=\"long?alt=long&text=long\" data-throw-if-not-resolved=\"False\" />"
- description: "The user settable file http headers."
name: "httpHeaders"
type: "<xref href=\"com.azure.storage.file.share.models.ShareFileHttpHeaders?alt=com.azure.storage.file.share.models.ShareFileHttpHeaders&text=ShareFileHttpHeaders\" data-throw-if-not-resolved=\"False\" />"
- description: "The user settable file smb properties."
name: "smbProperties"
type: "<xref href=\"com.azure.storage.file.share.FileSmbProperties?alt=com.azure.storage.file.share.FileSmbProperties&text=FileSmbProperties\" data-throw-if-not-resolved=\"False\" />"
- description: "The file permission of the file"
name: "filePermission"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public ShareFileInfo setProperties(long newFileSize, ShareFileHttpHeaders httpHeaders, FileSmbProperties smbProperties, String filePermission)"
desc: "Sets the user-defined httpHeaders to associate to the file.\n\nIf `null` is passed for the httpHeaders it will clear the httpHeaders associated to the file.\n\n**Code Samples**\n\nSet the httpHeaders of contentType of \"text/plain\"\n\n```java\nShareFileHttpHeaders httpHeaders = new ShareFileHttpHeaders()\n .setContentType(\"text/html\")\n .setContentEncoding(\"gzip\")\n .setContentLanguage(\"en\")\n .setCacheControl(\"no-transform\")\n .setContentDisposition(\"attachment\");\n FileSmbProperties smbProperties = new FileSmbProperties()\n .setNtfsFileAttributes(EnumSet.of(NtfsFileAttributes.READ_ONLY))\n .setFileCreationTime(OffsetDateTime.now())\n .setFileLastWriteTime(OffsetDateTime.now())\n .setFilePermissionKey(\"filePermissionKey\");\n String filePermission = \"filePermission\";\n // NOTE: filePermission and filePermissionKey should never be both set\n fileClient.setProperties(1024, httpHeaders, smbProperties, filePermission);\n System.out.println(\"Setting the file httpHeaders completed.\");\n```\n\nClear the httpHeaders of the file and preserve the SMB properties\n\n```java\nShareFileInfo response = fileClient.setProperties(1024, null, null, null);\n System.out.println(\"Setting the file httpHeaders completed.\");\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/set-file-properties"
returns:
description: "The <xref uid=\"com.azure.storage.file.share.models.ShareFileInfo\" data-throw-if-not-resolved=\"false\" data-raw-source=\"file info\"></xref>"
type: "<xref href=\"com.azure.storage.file.share.models.ShareFileInfo?alt=com.azure.storage.file.share.models.ShareFileInfo&text=ShareFileInfo\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.storage.file.share.ShareFileClient.setPropertiesWithResponse(long,com.azure.storage.file.share.models.ShareFileHttpHeaders,com.azure.storage.file.share.FileSmbProperties,java.lang.String,com.azure.storage.file.share.models.ShareRequestConditions,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareFileClient.setPropertiesWithResponse(long newFileSize, ShareFileHttpHeaders httpHeaders, FileSmbProperties smbProperties, String filePermission, ShareRequestConditions requestConditions, Duration timeout, Context context)"
name: "setPropertiesWithResponse(long newFileSize, ShareFileHttpHeaders httpHeaders, FileSmbProperties smbProperties, String filePermission, ShareRequestConditions requestConditions, Duration timeout, Context context)"
nameWithType: "ShareFileClient.setPropertiesWithResponse(long newFileSize, ShareFileHttpHeaders httpHeaders, FileSmbProperties smbProperties, String filePermission, ShareRequestConditions requestConditions, Duration timeout, Context context)"
summary: "Sets the user-defined http<wbr>Headers to associate to the file."
parameters:
- description: "New file size of the file"
name: "newFileSize"
type: "<xref href=\"long?alt=long&text=long\" data-throw-if-not-resolved=\"False\" />"
- description: "The user settable file http headers."
name: "httpHeaders"
type: "<xref href=\"com.azure.storage.file.share.models.ShareFileHttpHeaders?alt=com.azure.storage.file.share.models.ShareFileHttpHeaders&text=ShareFileHttpHeaders\" data-throw-if-not-resolved=\"False\" />"
- description: "The user settable file smb properties."
name: "smbProperties"
type: "<xref href=\"com.azure.storage.file.share.FileSmbProperties?alt=com.azure.storage.file.share.FileSmbProperties&text=FileSmbProperties\" data-throw-if-not-resolved=\"False\" />"
- description: "The file permission of the file"
name: "filePermission"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "<xref uid=\"com.azure.storage.file.share.models.ShareRequestConditions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareRequestConditions\"></xref>"
name: "requestConditions"
type: "<xref href=\"com.azure.storage.file.share.models.ShareRequestConditions?alt=com.azure.storage.file.share.models.ShareRequestConditions&text=ShareRequestConditions\" data-throw-if-not-resolved=\"False\" />"
- description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be thrown."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Response<ShareFileInfo> setPropertiesWithResponse(long newFileSize, ShareFileHttpHeaders httpHeaders, FileSmbProperties smbProperties, String filePermission, ShareRequestConditions requestConditions, Duration timeout, Context context)"
desc: "Sets the user-defined httpHeaders to associate to the file.\n\nIf `null` is passed for the httpHeaders it will clear the httpHeaders associated to the file.\n\n**Code Samples**\n\nSet the httpHeaders of contentType of \"text/plain\"\n\n```java\nShareRequestConditions requestConditions = new ShareRequestConditions().setLeaseId(leaseId);\n ShareFileHttpHeaders httpHeaders = new ShareFileHttpHeaders()\n .setContentType(\"text/html\")\n .setContentEncoding(\"gzip\")\n .setContentLanguage(\"en\")\n .setCacheControl(\"no-transform\")\n .setContentDisposition(\"attachment\");\n FileSmbProperties smbProperties = new FileSmbProperties()\n .setNtfsFileAttributes(EnumSet.of(NtfsFileAttributes.READ_ONLY))\n .setFileCreationTime(OffsetDateTime.now())\n .setFileLastWriteTime(OffsetDateTime.now())\n .setFilePermissionKey(\"filePermissionKey\");\n String filePermission = \"filePermission\";\n // NOTE: filePermission and filePermissionKey should never be both set\n fileClient.setPropertiesWithResponse(1024, httpHeaders, smbProperties, filePermission, requestConditions, null,\n null);\n System.out.println(\"Setting the file httpHeaders completed.\");\n```\n\nClear the httpHeaders of the file and preserve the SMB properties\n\n```java\nShareRequestConditions requestConditions = new ShareRequestConditions().setLeaseId(leaseId);\n Response<ShareFileInfo> response = fileClient.setPropertiesWithResponse(1024, null, null, null, requestConditions,\n Duration.ofSeconds(1), new Context(key1, value1));\n System.out.printf(\"Setting the file httpHeaders completed with status code %d\", response.getStatusCode());\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/set-file-properties"
returns:
description: "Response containing the <xref uid=\"com.azure.storage.file.share.models.ShareFileInfo\" data-throw-if-not-resolved=\"false\" data-raw-source=\"file info\"></xref> with headers and status code"
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.storage.file.share.models.ShareFileInfo?alt=com.azure.storage.file.share.models.ShareFileInfo&text=ShareFileInfo\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.storage.file.share.ShareFileClient.setPropertiesWithResponse(long,com.azure.storage.file.share.models.ShareFileHttpHeaders,com.azure.storage.file.share.FileSmbProperties,java.lang.String,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareFileClient.setPropertiesWithResponse(long newFileSize, ShareFileHttpHeaders httpHeaders, FileSmbProperties smbProperties, String filePermission, Duration timeout, Context context)"
name: "setPropertiesWithResponse(long newFileSize, ShareFileHttpHeaders httpHeaders, FileSmbProperties smbProperties, String filePermission, Duration timeout, Context context)"
nameWithType: "ShareFileClient.setPropertiesWithResponse(long newFileSize, ShareFileHttpHeaders httpHeaders, FileSmbProperties smbProperties, String filePermission, Duration timeout, Context context)"
summary: "Sets the user-defined http<wbr>Headers to associate to the file."
parameters:
- description: "New file size of the file"
name: "newFileSize"
type: "<xref href=\"long?alt=long&text=long\" data-throw-if-not-resolved=\"False\" />"
- description: "The user settable file http headers."
name: "httpHeaders"
type: "<xref href=\"com.azure.storage.file.share.models.ShareFileHttpHeaders?alt=com.azure.storage.file.share.models.ShareFileHttpHeaders&text=ShareFileHttpHeaders\" data-throw-if-not-resolved=\"False\" />"
- description: "The user settable file smb properties."
name: "smbProperties"
type: "<xref href=\"com.azure.storage.file.share.FileSmbProperties?alt=com.azure.storage.file.share.FileSmbProperties&text=FileSmbProperties\" data-throw-if-not-resolved=\"False\" />"
- description: "The file permission of the file"
name: "filePermission"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be thrown."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Response<ShareFileInfo> setPropertiesWithResponse(long newFileSize, ShareFileHttpHeaders httpHeaders, FileSmbProperties smbProperties, String filePermission, Duration timeout, Context context)"
desc: "Sets the user-defined httpHeaders to associate to the file.\n\nIf `null` is passed for the httpHeaders it will clear the httpHeaders associated to the file.\n\n**Code Samples**\n\nSet the httpHeaders of contentType of \"text/plain\"\n\n```java\nShareFileHttpHeaders httpHeaders = new ShareFileHttpHeaders()\n .setContentType(\"text/html\")\n .setContentEncoding(\"gzip\")\n .setContentLanguage(\"en\")\n .setCacheControl(\"no-transform\")\n .setContentDisposition(\"attachment\");\n FileSmbProperties smbProperties = new FileSmbProperties()\n .setNtfsFileAttributes(EnumSet.of(NtfsFileAttributes.READ_ONLY))\n .setFileCreationTime(OffsetDateTime.now())\n .setFileLastWriteTime(OffsetDateTime.now())\n .setFilePermissionKey(\"filePermissionKey\");\n String filePermission = \"filePermission\";\n // NOTE: filePermission and filePermissionKey should never be both set\n Response<ShareFileInfo> response = fileClient.setPropertiesWithResponse(1024, httpHeaders, smbProperties,\n filePermission, Duration.ofSeconds(1), new Context(key1, value1));\n System.out.printf(\"Setting the file httpHeaders completed with status code %d\", response.getStatusCode());\n```\n\nClear the httpHeaders of the file and preserve the SMB properties\n\n```java\nResponse<ShareFileInfo> response = fileClient.setPropertiesWithResponse(1024, null, null, null,\n Duration.ofSeconds(1), new Context(key1, value1));\n System.out.printf(\"Setting the file httpHeaders completed with status code %d\", response.getStatusCode());\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/set-file-properties"
returns:
description: "Response containing the <xref uid=\"com.azure.storage.file.share.models.ShareFileInfo\" data-throw-if-not-resolved=\"false\" data-raw-source=\"file info\"></xref> with headers and status code"
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.storage.file.share.models.ShareFileInfo?alt=com.azure.storage.file.share.models.ShareFileInfo&text=ShareFileInfo\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.storage.file.share.ShareFileClient.upload(java.io.InputStream,long)"
fullName: "com.azure.storage.file.share.ShareFileClient.upload(InputStream data, long length)"
name: "upload(InputStream data, long length)"
nameWithType: "ShareFileClient.upload(InputStream data, long length)"
summary: "Uploads a range of bytes to the beginning of a file in storage file service."
deprecatedTag: "Use <xref uid=\"com.azure.storage.file.share.ShareFileClient.uploadRange(java.io.InputStream,long)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareFileClient#uploadRange(InputStream, long)\"></xref> instead. Or consider <xref uid=\"com.azure.storage.file.share.ShareFileClient.upload(java.io.InputStream,long,com.azure.storage.common.ParallelTransferOptions)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareFileClient#upload(InputStream, long, ParallelTransferOptions)\"></xref> for an upload that can handle large amounts of data."
parameters:
- description: "The data which will upload to the storage file."
name: "data"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html\">InputStream</a>"
- description: "Specifies the number of bytes being transmitted in the request body. Value must be greater than or\n equal to 1."
name: "length"
type: "<xref href=\"long?alt=long&text=long\" data-throw-if-not-resolved=\"False\" />"
syntax: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Deprecated.html\">@Deprecated</a></br>public ShareFileUploadInfo upload(InputStream data, long length)"
desc: "Uploads a range of bytes to the beginning of a file in storage file service. Upload operations performs an in-place write on the specified file.\n\n**Code Samples**\n\nUpload data \"default\" to the file in Storage File Service.\n\n```java\nInputStream uploadData = new ByteArrayInputStream(data);\n ShareFileUploadInfo response = fileClient.upload(uploadData, data.length);\n System.out.println(\"Complete uploading the data with eTag: \" + response.getETag());\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/put-range"
hasDeprecatedTag: true
returns:
description: "The <xref uid=\"com.azure.storage.file.share.models.ShareFileUploadInfo\" data-throw-if-not-resolved=\"false\" data-raw-source=\"file upload info\"></xref>"
type: "<xref href=\"com.azure.storage.file.share.models.ShareFileUploadInfo?alt=com.azure.storage.file.share.models.ShareFileUploadInfo&text=ShareFileUploadInfo\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.storage.file.share.ShareFileClient.upload(java.io.InputStream,long,com.azure.storage.common.ParallelTransferOptions)"
fullName: "com.azure.storage.file.share.ShareFileClient.upload(InputStream data, long length, ParallelTransferOptions transferOptions)"
name: "upload(InputStream data, long length, ParallelTransferOptions transferOptions)"
nameWithType: "ShareFileClient.upload(InputStream data, long length, ParallelTransferOptions transferOptions)"
summary: "Buffers a range of bytes and uploads sub-ranges in parallel to a file in storage file service."
parameters:
- description: "The data which will upload to the storage file."
name: "data"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html\">InputStream</a>"
- description: "Specifies the number of bytes being transmitted in the request body. Value must be greater than or\n equal to 1."
name: "length"
type: "<xref href=\"long?alt=long&text=long\" data-throw-if-not-resolved=\"False\" />"
- description: "<xref uid=\"com.azure.storage.common.ParallelTransferOptions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ParallelTransferOptions\"></xref> for file transfer."
name: "transferOptions"
type: "<xref href=\"com.azure.storage.common.ParallelTransferOptions?alt=com.azure.storage.common.ParallelTransferOptions&text=ParallelTransferOptions\" data-throw-if-not-resolved=\"False\" />"
syntax: "public ShareFileUploadInfo upload(InputStream data, long length, ParallelTransferOptions transferOptions)"
desc: "Buffers a range of bytes and uploads sub-ranges in parallel to a file in storage file service. Upload operations perform an in-place write on the specified file.\n\n**Code Samples**\n\nUpload data \"default\" to the file in Storage File Service.\n\n```java\nInputStream uploadData = new ByteArrayInputStream(data);\n ShareFileUploadInfo response = shareFileClient.upload(uploadData, data.length, null);\n System.out.println(\"Complete uploading the data with eTag: \" + response.getETag());\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/put-range"
returns:
description: "The <xref uid=\"com.azure.storage.file.share.models.ShareFileUploadInfo\" data-throw-if-not-resolved=\"false\" data-raw-source=\"file upload info\"></xref>"
type: "<xref href=\"com.azure.storage.file.share.models.ShareFileUploadInfo?alt=com.azure.storage.file.share.models.ShareFileUploadInfo&text=ShareFileUploadInfo\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.storage.file.share.ShareFileClient.uploadFromFile(java.lang.String)"
fullName: "com.azure.storage.file.share.ShareFileClient.uploadFromFile(String uploadFilePath)"
name: "uploadFromFile(String uploadFilePath)"
nameWithType: "ShareFileClient.uploadFromFile(String uploadFilePath)"
summary: "Uploads file to storage file service."
parameters:
- description: "The path where store the source file to upload"
name: "uploadFilePath"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public void uploadFromFile(String uploadFilePath)"
desc: "Uploads file to storage file service.\n\n**Code Samples**\n\nUpload the file from the source file path.\n\n```java\nfileClient.uploadFromFile(\"someFilePath\");\n```\n\nFor more information, see the [Azure Docs Create File][] and [Azure Docs Upload][].\n\n\n[Azure Docs Create File]: https://docs.microsoft.com/rest/api/storageservices/create-file\n[Azure Docs Upload]: https://docs.microsoft.com/rest/api/storageservices/put-range"
- uid: "com.azure.storage.file.share.ShareFileClient.uploadFromFile(java.lang.String,com.azure.storage.file.share.models.ShareRequestConditions)"
fullName: "com.azure.storage.file.share.ShareFileClient.uploadFromFile(String uploadFilePath, ShareRequestConditions requestConditions)"
name: "uploadFromFile(String uploadFilePath, ShareRequestConditions requestConditions)"
nameWithType: "ShareFileClient.uploadFromFile(String uploadFilePath, ShareRequestConditions requestConditions)"
summary: "Uploads file to storage file service."
parameters:
- description: "The path where store the source file to upload"
name: "uploadFilePath"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "<xref uid=\"com.azure.storage.file.share.models.ShareRequestConditions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareRequestConditions\"></xref>"
name: "requestConditions"
type: "<xref href=\"com.azure.storage.file.share.models.ShareRequestConditions?alt=com.azure.storage.file.share.models.ShareRequestConditions&text=ShareRequestConditions\" data-throw-if-not-resolved=\"False\" />"
syntax: "public void uploadFromFile(String uploadFilePath, ShareRequestConditions requestConditions)"
desc: "Uploads file to storage file service.\n\n**Code Samples**\n\nUpload the file from the source file path.\n\n```java\nShareRequestConditions requestConditions = new ShareRequestConditions().setLeaseId(leaseId);\n fileClient.uploadFromFile(\"someFilePath\", requestConditions);\n```\n\nFor more information, see the [Azure Docs Create File][] and [Azure Docs Upload][].\n\n\n[Azure Docs Create File]: https://docs.microsoft.com/rest/api/storageservices/create-file\n[Azure Docs Upload]: https://docs.microsoft.com/rest/api/storageservices/put-range"
- uid: "com.azure.storage.file.share.ShareFileClient.uploadRange(java.io.InputStream,long)"
fullName: "com.azure.storage.file.share.ShareFileClient.uploadRange(InputStream data, long length)"
name: "uploadRange(InputStream data, long length)"
nameWithType: "ShareFileClient.uploadRange(InputStream data, long length)"
summary: "Uploads a range of bytes to the specified offset of a file in storage file service."
parameters:
- description: "The data which will upload to the storage file."
name: "data"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html\">InputStream</a>"
- description: "Specifies the number of bytes being transmitted in the request body. Value must be greater than or\n equal to 1."
name: "length"
type: "<xref href=\"long?alt=long&text=long\" data-throw-if-not-resolved=\"False\" />"
syntax: "public ShareFileUploadInfo uploadRange(InputStream data, long length)"
desc: "Uploads a range of bytes to the specified offset of a file in storage file service. Upload operations perform an in-place write on the specified file.\n\n**Code Samples**\n\nUpload data \"default\" to the file in Storage File Service.\n\n```java\nInputStream uploadData = new ByteArrayInputStream(data);\n ShareFileUploadInfo response = shareFileClient.uploadRange(uploadData, data.length);\n System.out.println(\"Complete uploading the data with eTag: \" + response.getETag());\n```\n\nThis method does a single Put Range operation. For more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/put-range"
returns:
description: "The <xref uid=\"com.azure.storage.file.share.models.ShareFileUploadInfo\" data-throw-if-not-resolved=\"false\" data-raw-source=\"file upload info\"></xref>"
type: "<xref href=\"com.azure.storage.file.share.models.ShareFileUploadInfo?alt=com.azure.storage.file.share.models.ShareFileUploadInfo&text=ShareFileUploadInfo\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.storage.file.share.ShareFileClient.uploadRangeFromUrl(long,long,long,java.lang.String)"
fullName: "com.azure.storage.file.share.ShareFileClient.uploadRangeFromUrl(long length, long destinationOffset, long sourceOffset, String sourceUrl)"
name: "uploadRangeFromUrl(long length, long destinationOffset, long sourceOffset, String sourceUrl)"
nameWithType: "ShareFileClient.uploadRangeFromUrl(long length, long destinationOffset, long sourceOffset, String sourceUrl)"
summary: "Uploads a range of bytes from one file to another file."
parameters:
- description: "Specifies the number of bytes being transmitted in the request body."
name: "length"
type: "<xref href=\"long?alt=long&text=long\" data-throw-if-not-resolved=\"False\" />"
- description: "Starting point of the upload range on the destination."
name: "destinationOffset"
type: "<xref href=\"long?alt=long&text=long\" data-throw-if-not-resolved=\"False\" />"
- description: "Starting point of the upload range on the source."
name: "sourceOffset"
type: "<xref href=\"long?alt=long&text=long\" data-throw-if-not-resolved=\"False\" />"
- description: "Specifies the URL of the source file."
name: "sourceUrl"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public ShareFileUploadRangeFromUrlInfo uploadRangeFromUrl(long length, long destinationOffset, long sourceOffset, String sourceUrl)"
desc: "Uploads a range of bytes from one file to another file.\n\n**Code Samples**\n\nUpload a number of bytes from a file at defined source and destination offsets\n\n```java\nShareFileUploadRangeFromUrlInfo response = fileClient.uploadRangeFromUrl(6, 8, 0, \"sourceUrl\");\n System.out.println(\"Completed upload range from url!\");\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/put-range-from-url"
returns:
description: "The <xref uid=\"com.azure.storage.file.share.models.ShareFileUploadRangeFromUrlInfo\" data-throw-if-not-resolved=\"false\" data-raw-source=\"file upload range from url info\"></xref>"
type: "<xref href=\"com.azure.storage.file.share.models.ShareFileUploadRangeFromUrlInfo?alt=com.azure.storage.file.share.models.ShareFileUploadRangeFromUrlInfo&text=ShareFileUploadRangeFromUrlInfo\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.storage.file.share.ShareFileClient.uploadRangeFromUrlWithResponse(com.azure.storage.file.share.options.ShareFileUploadRangeFromUrlOptions,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareFileClient.uploadRangeFromUrlWithResponse(ShareFileUploadRangeFromUrlOptions options, Duration timeout, Context context)"
name: "uploadRangeFromUrlWithResponse(ShareFileUploadRangeFromUrlOptions options, Duration timeout, Context context)"
nameWithType: "ShareFileClient.uploadRangeFromUrlWithResponse(ShareFileUploadRangeFromUrlOptions options, Duration timeout, Context context)"
summary: "Uploads a range of bytes from one file to another file."
parameters:
- description: "argument collection"
name: "options"
type: "<xref href=\"com.azure.storage.file.share.options.ShareFileUploadRangeFromUrlOptions?alt=com.azure.storage.file.share.options.ShareFileUploadRangeFromUrlOptions&text=ShareFileUploadRangeFromUrlOptions\" data-throw-if-not-resolved=\"False\" />"
- description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be thrown."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Response<ShareFileUploadRangeFromUrlInfo> uploadRangeFromUrlWithResponse(ShareFileUploadRangeFromUrlOptions options, Duration timeout, Context context)"
desc: "Uploads a range of bytes from one file to another file.\n\n**Code Samples**\n\nUpload a number of bytes from a file at defined source and destination offsets\n\n```java\nResponse<ShareFileUploadRangeFromUrlInfo> response =\n fileClient.uploadRangeFromUrlWithResponse(new ShareFileUploadRangeFromUrlOptions(6, \"sourceUrl\")\n .setDestinationOffset(8), Duration.ofSeconds(1), Context.NONE);\n System.out.println(\"Completed upload range from url!\");\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/put-range-from-url"
returns:
description: "A response containing the <xref uid=\"com.azure.storage.file.share.models.ShareFileUploadRangeFromUrlInfo\" data-throw-if-not-resolved=\"false\" data-raw-source=\"file upload range from url info\"></xref> with\n headers and response status code."
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.storage.file.share.models.ShareFileUploadRangeFromUrlInfo?alt=com.azure.storage.file.share.models.ShareFileUploadRangeFromUrlInfo&text=ShareFileUploadRangeFromUrlInfo\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.storage.file.share.ShareFileClient.uploadRangeFromUrlWithResponse(long,long,long,java.lang.String,com.azure.storage.file.share.models.ShareRequestConditions,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareFileClient.uploadRangeFromUrlWithResponse(long length, long destinationOffset, long sourceOffset, String sourceUrl, ShareRequestConditions requestConditions, Duration timeout, Context context)"
name: "uploadRangeFromUrlWithResponse(long length, long destinationOffset, long sourceOffset, String sourceUrl, ShareRequestConditions requestConditions, Duration timeout, Context context)"
nameWithType: "ShareFileClient.uploadRangeFromUrlWithResponse(long length, long destinationOffset, long sourceOffset, String sourceUrl, ShareRequestConditions requestConditions, Duration timeout, Context context)"
summary: "Uploads a range of bytes from one file to another file."
parameters:
- description: "Specifies the number of bytes being transmitted in the request body."
name: "length"
type: "<xref href=\"long?alt=long&text=long\" data-throw-if-not-resolved=\"False\" />"
- description: "Starting point of the upload range on the destination."
name: "destinationOffset"
type: "<xref href=\"long?alt=long&text=long\" data-throw-if-not-resolved=\"False\" />"
- description: "Starting point of the upload range on the source."
name: "sourceOffset"
type: "<xref href=\"long?alt=long&text=long\" data-throw-if-not-resolved=\"False\" />"
- description: "Specifies the URL of the source file."
name: "sourceUrl"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "<xref uid=\"com.azure.storage.file.share.models.ShareRequestConditions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareRequestConditions\"></xref>"
name: "requestConditions"
type: "<xref href=\"com.azure.storage.file.share.models.ShareRequestConditions?alt=com.azure.storage.file.share.models.ShareRequestConditions&text=ShareRequestConditions\" data-throw-if-not-resolved=\"False\" />"
- description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be thrown."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Response<ShareFileUploadRangeFromUrlInfo> uploadRangeFromUrlWithResponse(long length, long destinationOffset, long sourceOffset, String sourceUrl, ShareRequestConditions requestConditions, Duration timeout, Context context)"
desc: "Uploads a range of bytes from one file to another file.\n\n**Code Samples**\n\nUpload a number of bytes from a file at defined source and destination offsets\n\n```java\nShareRequestConditions requestConditions = new ShareRequestConditions().setLeaseId(leaseId);\n Response<ShareFileUploadRangeFromUrlInfo> response = fileClient.uploadRangeFromUrlWithResponse(6, 8, 0,\n \"sourceUrl\", requestConditions, Duration.ofSeconds(1), Context.NONE);\n System.out.println(\"Completed upload range from url!\");\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/put-range-from-url"
returns:
description: "A response containing the <xref uid=\"com.azure.storage.file.share.models.ShareFileUploadRangeFromUrlInfo\" data-throw-if-not-resolved=\"false\" data-raw-source=\"file upload range from url info\"></xref> with\n headers and response status code."
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.storage.file.share.models.ShareFileUploadRangeFromUrlInfo?alt=com.azure.storage.file.share.models.ShareFileUploadRangeFromUrlInfo&text=ShareFileUploadRangeFromUrlInfo\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.storage.file.share.ShareFileClient.uploadRangeFromUrlWithResponse(long,long,long,java.lang.String,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareFileClient.uploadRangeFromUrlWithResponse(long length, long destinationOffset, long sourceOffset, String sourceUrl, Duration timeout, Context context)"
name: "uploadRangeFromUrlWithResponse(long length, long destinationOffset, long sourceOffset, String sourceUrl, Duration timeout, Context context)"
nameWithType: "ShareFileClient.uploadRangeFromUrlWithResponse(long length, long destinationOffset, long sourceOffset, String sourceUrl, Duration timeout, Context context)"
summary: "Uploads a range of bytes from one file to another file."
parameters:
- description: "Specifies the number of bytes being transmitted in the request body."
name: "length"
type: "<xref href=\"long?alt=long&text=long\" data-throw-if-not-resolved=\"False\" />"
- description: "Starting point of the upload range on the destination."
name: "destinationOffset"
type: "<xref href=\"long?alt=long&text=long\" data-throw-if-not-resolved=\"False\" />"
- description: "Starting point of the upload range on the source."
name: "sourceOffset"
type: "<xref href=\"long?alt=long&text=long\" data-throw-if-not-resolved=\"False\" />"
- description: "Specifies the URL of the source file."
name: "sourceUrl"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be thrown."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Response<ShareFileUploadRangeFromUrlInfo> uploadRangeFromUrlWithResponse(long length, long destinationOffset, long sourceOffset, String sourceUrl, Duration timeout, Context context)"
desc: "Uploads a range of bytes from one file to another file.\n\n**Code Samples**\n\nUpload a number of bytes from a file at defined source and destination offsets\n\n```java\nResponse<ShareFileUploadRangeFromUrlInfo> response =\n fileClient.uploadRangeFromUrlWithResponse(6, 8, 0, \"sourceUrl\", Duration.ofSeconds(1), Context.NONE);\n System.out.println(\"Completed upload range from url!\");\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/put-range-from-url"
returns:
description: "A response containing the <xref uid=\"com.azure.storage.file.share.models.ShareFileUploadRangeFromUrlInfo\" data-throw-if-not-resolved=\"false\" data-raw-source=\"file upload range from url info\"></xref> with\n headers and response status code."
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.storage.file.share.models.ShareFileUploadRangeFromUrlInfo?alt=com.azure.storage.file.share.models.ShareFileUploadRangeFromUrlInfo&text=ShareFileUploadRangeFromUrlInfo\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.storage.file.share.ShareFileClient.uploadRangeWithResponse(com.azure.storage.file.share.models.ShareFileUploadRangeOptions,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareFileClient.uploadRangeWithResponse(ShareFileUploadRangeOptions options, Duration timeout, Context context)"
name: "uploadRangeWithResponse(ShareFileUploadRangeOptions options, Duration timeout, Context context)"
nameWithType: "ShareFileClient.uploadRangeWithResponse(ShareFileUploadRangeOptions options, Duration timeout, Context context)"
summary: "Uploads a range of bytes to the specified offset of a file in storage file service."
parameters:
- description: "Argument collection for the upload operation."
name: "options"
type: "<xref href=\"com.azure.storage.file.share.models.ShareFileUploadRangeOptions?alt=com.azure.storage.file.share.models.ShareFileUploadRangeOptions&text=ShareFileUploadRangeOptions\" data-throw-if-not-resolved=\"False\" />"
- description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be thrown."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Response<ShareFileUploadInfo> uploadRangeWithResponse(ShareFileUploadRangeOptions options, Duration timeout, Context context)"
desc: "Uploads a range of bytes to the specified offset of a file in storage file service. Upload operations perform an in-place write on the specified file.\n\n**Code Samples**\n\nUpload data \"default\" to the file in Storage File Service.\n\n```java\nInputStream uploadData = new ByteArrayInputStream(data);\n Response<ShareFileUploadInfo> response = shareFileClient.uploadRangeWithResponse(\n new ShareFileUploadRangeOptions(uploadData, data.length), Duration.ofSeconds(30), null);\n System.out.printf(\"Completed uploading the data with response %d%n.\", response.getStatusCode());\n System.out.printf(\"ETag of the file is %s%n\", response.getValue().getETag());\n```\n\nThis method does a single Put Range operation. For more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/put-range"
returns:
description: "The <xref uid=\"com.azure.storage.file.share.models.ShareFileUploadInfo\" data-throw-if-not-resolved=\"false\" data-raw-source=\"file upload info\"></xref>"
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.storage.file.share.models.ShareFileUploadInfo?alt=com.azure.storage.file.share.models.ShareFileUploadInfo&text=ShareFileUploadInfo\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.storage.file.share.ShareFileClient.uploadWithResponse(com.azure.storage.file.share.models.ShareFileUploadOptions,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareFileClient.uploadWithResponse(ShareFileUploadOptions options, Duration timeout, Context context)"
name: "uploadWithResponse(ShareFileUploadOptions options, Duration timeout, Context context)"
nameWithType: "ShareFileClient.uploadWithResponse(ShareFileUploadOptions options, Duration timeout, Context context)"
summary: "Buffers a range of bytes and uploads sub-ranges in parallel to a file in storage file service."
parameters:
- description: "Argument collection for the upload operation."
name: "options"
type: "<xref href=\"com.azure.storage.file.share.models.ShareFileUploadOptions?alt=com.azure.storage.file.share.models.ShareFileUploadOptions&text=ShareFileUploadOptions\" data-throw-if-not-resolved=\"False\" />"
- description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be thrown."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Response<ShareFileUploadInfo> uploadWithResponse(ShareFileUploadOptions options, Duration timeout, Context context)"
desc: "Buffers a range of bytes and uploads sub-ranges in parallel to a file in storage file service. Upload operations perform an in-place write on the specified file.\n\n**Code Samples**\n\nUpload data \"default\" to the file in Storage File Service.\n\n```java\nInputStream uploadData = new ByteArrayInputStream(data);\n Response<ShareFileUploadInfo> response = shareFileAsyncClient.uploadWithResponse(\n new ShareFileUploadOptions(uploadData, data.length), Duration.ofSeconds(30), null);\n System.out.printf(\"Completed uploading the data with response %d%n.\", response.getStatusCode());\n System.out.printf(\"ETag of the file is %s%n\", response.getValue().getETag());\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/put-range"
returns:
description: "The <xref uid=\"com.azure.storage.file.share.models.ShareFileUploadInfo\" data-throw-if-not-resolved=\"false\" data-raw-source=\"file upload info\"></xref>"
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.storage.file.share.models.ShareFileUploadInfo?alt=com.azure.storage.file.share.models.ShareFileUploadInfo&text=ShareFileUploadInfo\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.storage.file.share.ShareFileClient.uploadWithResponse(java.io.InputStream,long,java.lang.Long,com.azure.storage.file.share.models.ShareRequestConditions,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareFileClient.uploadWithResponse(InputStream data, long length, Long offset, ShareRequestConditions requestConditions, Duration timeout, Context context)"
name: "uploadWithResponse(InputStream data, long length, Long offset, ShareRequestConditions requestConditions, Duration timeout, Context context)"
nameWithType: "ShareFileClient.uploadWithResponse(InputStream data, long length, Long offset, ShareRequestConditions requestConditions, Duration timeout, Context context)"
summary: "Uploads a range of bytes to specific of a file in storage file service."
deprecatedTag: "Use <xref uid=\"com.azure.storage.file.share.ShareFileClient.uploadRangeWithResponse(com.azure.storage.file.share.models.ShareFileUploadRangeOptions,java.time.Duration,com.azure.core.util.Context)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareFileClient#uploadRangeWithResponse(ShareFileUploadRangeOptions, Duration, Context)\"></xref> instead. Or consider <xref uid=\"com.azure.storage.file.share.ShareFileClient.uploadWithResponse(com.azure.storage.file.share.models.ShareFileUploadOptions,java.time.Duration,com.azure.core.util.Context)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareFileClient#uploadWithResponse(ShareFileUploadOptions, Duration, Context)\"></xref> for an upload that can handle large amounts of data."
parameters:
- description: "The data which will upload to the storage file."
name: "data"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html\">InputStream</a>"
- description: "Specifies the number of bytes being transmitted in the request body. Value must be greater than or\n equal to 1."
name: "length"
type: "<xref href=\"long?alt=long&text=long\" data-throw-if-not-resolved=\"False\" />"
- description: "Starting point of the upload range, if <code>null</code> it will start from the beginning."
name: "offset"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Long.html\">Long</a>"
- description: "<xref uid=\"com.azure.storage.file.share.models.ShareRequestConditions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareRequestConditions\"></xref>"
name: "requestConditions"
type: "<xref href=\"com.azure.storage.file.share.models.ShareRequestConditions?alt=com.azure.storage.file.share.models.ShareRequestConditions&text=ShareRequestConditions\" data-throw-if-not-resolved=\"False\" />"
- description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be thrown."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Deprecated.html\">@Deprecated</a></br>public Response<ShareFileUploadInfo> uploadWithResponse(InputStream data, long length, Long offset, ShareRequestConditions requestConditions, Duration timeout, Context context)"
desc: "Uploads a range of bytes to specific of a file in storage file service. Upload operations performs an in-place write on the specified file.\n\n**Code Samples**\n\nUpload data \"default\" starting from 1024.\n\n```java\nInputStream uploadData = new ByteArrayInputStream(data);\n ShareRequestConditions requestConditions = new ShareRequestConditions().setLeaseId(leaseId);\n Response<ShareFileUploadInfo> response = fileClient.uploadWithResponse(uploadData, data.length, 0L,\n requestConditions, Duration.ofSeconds(30), null);\n System.out.printf(\"Completed uploading the data with response %d%n.\", response.getStatusCode());\n System.out.printf(\"ETag of the file is %s%n\", response.getValue().getETag());\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/put-range"
hasDeprecatedTag: true
returns:
description: "A response containing the <xref uid=\"com.azure.storage.file.share.models.ShareFileUploadInfo\" data-throw-if-not-resolved=\"false\" data-raw-source=\"file upload info\"></xref> with headers and response\n status code."
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.storage.file.share.models.ShareFileUploadInfo?alt=com.azure.storage.file.share.models.ShareFileUploadInfo&text=ShareFileUploadInfo\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.storage.file.share.ShareFileClient.uploadWithResponse(java.io.InputStream,long,java.lang.Long,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareFileClient.uploadWithResponse(InputStream data, long length, Long offset, Duration timeout, Context context)"
name: "uploadWithResponse(InputStream data, long length, Long offset, Duration timeout, Context context)"
nameWithType: "ShareFileClient.uploadWithResponse(InputStream data, long length, Long offset, Duration timeout, Context context)"
summary: "Uploads a range of bytes to specific of a file in storage file service."
deprecatedTag: "Use <xref uid=\"com.azure.storage.file.share.ShareFileClient.uploadRangeWithResponse(com.azure.storage.file.share.models.ShareFileUploadRangeOptions,java.time.Duration,com.azure.core.util.Context)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareFileClient#uploadRangeWithResponse(ShareFileUploadRangeOptions, Duration, Context)\"></xref> instead. Or consider <xref uid=\"com.azure.storage.file.share.ShareFileClient.uploadWithResponse(com.azure.storage.file.share.models.ShareFileUploadOptions,java.time.Duration,com.azure.core.util.Context)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareFileClient#uploadWithResponse(ShareFileUploadOptions, Duration, Context)\"></xref> for an upload that can handle large amounts of data."
parameters:
- description: "The data which will upload to the storage file."
name: "data"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html\">InputStream</a>"
- description: "Specifies the number of bytes being transmitted in the request body. Value must be greater than or\n equal to 1."
name: "length"
type: "<xref href=\"long?alt=long&text=long\" data-throw-if-not-resolved=\"False\" />"
- description: "Starting point of the upload range, if <code>null</code> it will start from the beginning."
name: "offset"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Long.html\">Long</a>"
- description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be thrown."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Deprecated.html\">@Deprecated</a></br>public Response<ShareFileUploadInfo> uploadWithResponse(InputStream data, long length, Long offset, Duration timeout, Context context)"
desc: "Uploads a range of bytes to specific of a file in storage file service. Upload operations performs an in-place write on the specified file.\n\n**Code Samples**\n\nUpload data \"default\" starting from 1024.\n\n```java\nInputStream uploadData = new ByteArrayInputStream(data);\n Response<ShareFileUploadInfo> response = fileClient.uploadWithResponse(uploadData, data.length, 0L,\n Duration.ofSeconds(30), null);\n System.out.printf(\"Completed uploading the data with response %d%n.\", response.getStatusCode());\n System.out.printf(\"ETag of the file is %s%n\", response.getValue().getETag());\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/put-range"
hasDeprecatedTag: true
returns:
description: "A response containing the <xref uid=\"com.azure.storage.file.share.models.ShareFileUploadInfo\" data-throw-if-not-resolved=\"false\" data-raw-source=\"file upload info\"></xref> with headers and response\n status code."
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.storage.file.share.models.ShareFileUploadInfo?alt=com.azure.storage.file.share.models.ShareFileUploadInfo&text=ShareFileUploadInfo\" data-throw-if-not-resolved=\"False\" />&gt;"
type: "class"
desc: "This class provides a client that contains all the operations for interacting files under Azure Storage File Service. Operations allowed by the client are creating, uploading, copying, listing, downloading, and deleting files.\n\n**Instantiating a synchronous File Client**\n\n```java\nShareFileClient client = new ShareFileClientBuilder()\n .connectionString(\"${connectionString}\")\n .endpoint(\"${endpoint}\")\n .buildFileClient();\n```\n\nView <xref uid=\"com.azure.storage.file.share.ShareFileClientBuilder\" data-throw-if-not-resolved=\"false\" data-raw-source=\"this\"></xref> for additional ways to construct the client."
metadata: {}
package: "com.azure.storage.file.share"
artifact: com.azure:azure-storage-file-share:12.17.1