diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/DirectoryAsyncClient.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/DirectoryAsyncClient.java index 2c88dbf1bbb3..e5a044464b8d 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/DirectoryAsyncClient.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/DirectoryAsyncClient.java @@ -141,6 +141,9 @@ public DirectoryAsyncClient getSubDirectoryClient(String subDirectoryName) { * * {@codesnippet com.azure.storage.file.directoryAsyncClient.create} * + *

For more information, see the + * Azure Docs.

+ * * @return A response containing the directory info and the status of creating the directory. * @throws StorageErrorException If the directory has already existed, the parent directory does not exist or directory name is an invalid resource name. */ @@ -157,6 +160,9 @@ public Mono> create() { * * {@codesnippet com.azure.storage.file.directoryAsyncClient.create#map} * + *

For more information, see the + * Azure Docs.

+ * * @param metadata Optional metadata to associate with the directory * @return A response containing the directory info and the status of creating the directory. * @throws StorageErrorException If the directory has already existed, the parent directory does not exist or directory name is an invalid resource name. @@ -175,6 +181,9 @@ public Mono> create(Map metadata) { * * {@codesnippet com.azure.storage.file.directoryClient.delete} * + *

For more information, see the + * Azure Docs.

+ * * @return A response that only contains headers and response status code * @throws StorageErrorException If the share doesn't exist */ @@ -193,6 +202,9 @@ public Mono delete() { * * {@codesnippet com.azure.storage.file.directoryAsyncClient.getProperties} * + *

For more information, see the + * Azure Docs.

+ * * @return Storage directory properties */ public Mono> getProperties() { @@ -215,6 +227,9 @@ public Mono> getProperties() { * * {@codesnippet com.azure.storage.file.directoryAsyncClient.setMetadata#map.clearMetadata} * + *

For more information, see the + * Azure Docs.

+ * * @param metadata Optional metadata to set on the directory, if null is passed the metadata for the directory is cleared * @return information about the directory * @throws StorageErrorException If the directory doesn't exist or the metadata contains invalid keys @@ -233,6 +248,9 @@ public Mono> setMetadata(Map * * {@codesnippet com.azure.storage.file.directoryClient.listFilesAndDirectories} * + *

For more information, see the + * Azure Docs.

+ * * @return {@link FileRef File info} in the storage directory */ public Flux listFilesAndDirectories() { @@ -248,6 +266,9 @@ public Flux listFilesAndDirectories() { * * {@codesnippet com.azure.storage.file.directoryAsyncClient.listFilesAndDirectories#string-integer} * + *

For more information, see the + * Azure Docs.

+ * * @param prefix Optional prefix which filters the results to return only files and directories whose name begins with. * @param maxResults Optional maximum number of files and/or directories to return per page. * If the request does not specify maxresults or specifies a value greater than 5,000, the server will return up to 5,000 items. @@ -267,6 +288,9 @@ public Flux listFilesAndDirectories(String prefix, Integer maxResults) * * {@codesnippet com.azure.storage.file.directoryAsyncClient.getHandles} * + *

For more information, see the + * Azure Docs.

+ * * @param maxResult Optional maximum number of results will return per page * @param recursive Specifies operation should apply to the directory specified in the URI, its files, its subdirectories and their files. * @return {@link HandleItem handles} in the directory that satisfy the requirements @@ -287,6 +311,9 @@ public Flux getHandles(Integer maxResult, boolean recursive) { * * {@codesnippet com.azure.storage.file.directoryAsyncClient.forceCloseHandles} * + *

For more information, see the + * Azure Docs.

+ * * @param handleId Specifies the handle ID to be closed. Use an asterisk ('*') as a wildcard string to specify all handles. * @param recursive A boolean value that specifies if the operation should also apply to the files and subdirectories of the directory specified in the URI. * @return The counts of number of handles closed @@ -305,6 +332,9 @@ public Flux forceCloseHandles(String handleId, boolean recursive) { * * {@codesnippet com.azure.storage.file.directoryAsyncClient.createSubDirectory#string} * + *

For more information, see the + * Azure Docs.

+ * * @param subDirectoryName Name of the subdirectory * @return A response containing the subdirectory client and the status of creating the directory. * @throws StorageErrorException If the subdirectory has already existed, the parent directory does not exist or directory is an invalid resource name. @@ -322,6 +352,9 @@ public Mono> createSubDirectory(String subDirecto * * {@codesnippet com.azure.storage.file.directoryClient.createSubDirectory#string-map} * + *

For more information, see the + * Azure Docs.

+ * * @param subDirectoryName Name of the subdirectory * @param metadata Optional metadata to associate with the subdirectory * @return A response containing the subdirectory client and the status of creating the directory. @@ -342,6 +375,9 @@ public Mono> createSubDirectory(String subDirecto * * {@codesnippet com.azure.storage.file.directoryAsyncClient.deleteSubDirectory#string} * + *

For more information, see the + * Azure Docs.

+ * * @param subDirectoryName Name of the subdirectory * @return A response that only contains headers and response status code * @throws StorageErrorException If the subdirectory doesn't exist, the parent directory does not exist or subdirectory name is an invalid resource name. @@ -360,6 +396,9 @@ public Mono deleteSubDirectory(String subDirectoryName) { * * {@codesnippet com.azure.storage.file.directoryAsyncClient.createFile#string-long} * + *

For more information, see the + * Azure Docs.

+ * * @param fileName Name of the file * @param maxSize Size of the file * @return A response containing the FileAsyncClient and the status of creating the directory. @@ -378,6 +417,9 @@ public Mono> createFile(String fileName, long maxSize) * * {@codesnippet com.azure.storage.file.directoryAsyncClient.createFile#string-long-fileHTTPHeaders-map} * + *

For more information, see the + * Azure Docs.

+ * * @param fileName Name of the file * @param maxSize Max size of the file * @param httpHeaders the Http headers set to the file @@ -399,6 +441,9 @@ public Mono> createFile(String fileName, long maxSize, * * {@codesnippet com.azure.storage.file.directoryAsyncClient.deleteFile#string} * + *

For more information, see the + * Azure Docs.

+ * * @param fileName Name of the file * @return A response that only contains headers and response status code * @throws StorageErrorException If the directory doesn't exist or the file doesn't exist or file name is an invalid resource name. diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/DirectoryClient.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/DirectoryClient.java index 44c84a0dade2..7de1792d0c35 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/DirectoryClient.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/DirectoryClient.java @@ -91,6 +91,9 @@ public DirectoryClient getSubDirectoryClient(String subDirectoryName) { * * {@codesnippet com.azure.storage.file.directoryClient.createDirectory} * + *

For more information, see the + * Azure Docs.

+ * * @return A response containing the directory info and the status of creating the directory. * @throws StorageErrorException If the directory has already existed, the parent directory does not exist or directory name is an invalid resource name. */ @@ -107,6 +110,9 @@ public Response create() { * * {@codesnippet com.azure.storage.file.directoryClient.create#map} * + *

For more information, see the + * Azure Docs.

+ * * @param metadata Optional metadata to associate with the directory. * @return A response containing the directory info and the status of creating the directory. * @throws StorageErrorException If the directory has already existed, the parent directory does not exist or directory name is an invalid resource name. @@ -124,6 +130,9 @@ public Response create(Map metadata) { * * {@codesnippet com.azure.storage.file.directoryClient.delete} * + *

For more information, see the + * Azure Docs.

+ * * @return A response that only contains headers and response status code * @throws StorageErrorException If the share doesn't exist */ @@ -141,6 +150,9 @@ public VoidResponse delete() { * * {@codesnippet com.azure.storage.file.directoryClient.getProperties} * + *

For more information, see the + * Azure Docs.

+ * * @return Storage directory properties */ public Response getProperties() { @@ -162,6 +174,9 @@ public Response getProperties() { * * {@codesnippet com.azure.storage.file.directoryClient.setMetadata#map.clearMetadata} * + *

For more information, see the + * Azure Docs.

+ * * @param metadata Optional metadata to set on the directory, if null is passed the metadata for the directory is cleared * @return information about the directory * @throws StorageErrorException If the directory doesn't exist or the metadata contains invalid keys @@ -179,6 +194,9 @@ public Response setMetadata(Map metada * * {@codesnippet com.azure.storage.file.directoryClient.listFilesAndDirectories} * + *

For more information, see the + * Azure Docs.

+ * * @return {@link FileRef File info} in the storage directory */ public Iterable listFilesAndDirectories() { @@ -194,6 +212,9 @@ public Iterable listFilesAndDirectories() { * * {@codesnippet com.azure.storage.file.directoryClient.listFilesAndDirectories#string-integer} * + *

For more information, see the + * Azure Docs.

+ * * @param prefix Optional prefix which filters the results to return only files and directories whose name begins with. * @param maxResults Optional maximum number of files and/or directories to return per page. * If the request does not specify maxresults or specifies a value greater than 5,000, the server will return up to 5,000 items. @@ -212,6 +233,9 @@ public Iterable listFilesAndDirectories(String prefix, Integer maxResul * * {@codesnippet com.azure.storage.file.directoryClient.getHandles} * + *

For more information, see the + * Azure Docs.

+ * * @param maxResult Optional maximum number of results will return per page * @param recursive Specifies operation should apply to the directory specified in the URI, its files, its subdirectories and their files. * @return {@link HandleItem handles} in the directory that satisfy the requirements @@ -231,6 +255,9 @@ public Iterable getHandles(Integer maxResult, boolean recursive) { * * {@codesnippet com.azure.storage.file.directoryClient.forceCloseHandles} * + *

For more information, see the + * Azure Docs.

+ * * @param handleId Specifies the handle ID to be closed. Use an asterisk ('*') as a wildcard string to specify all handles. * @param recursive A boolean value that specifies if the operation should also apply to the files and subdirectories of the directory specified in the URI. * @return The counts of number of handles closed. @@ -248,6 +275,9 @@ public Iterable forceCloseHandles(String handleId, boolean recursive) { * * {@codesnippet com.azure.storage.file.directoryClient.createSubDirectory#string} * + *

For more information, see the + * Azure Docs.

+ * * @param subDirectoryName Name of the subdirectory * @return A response containing the subdirectory client and the status of creating the directory. * @throws StorageErrorException If the subdirectory has already existed, the parent directory does not exist or directory is an invalid resource name. @@ -265,6 +295,9 @@ public Response createSubDirectory(String subDirectoryName) { * * {@codesnippet com.azure.storage.file.directoryClient.createSubDirectory#string-map} * + *

For more information, see the + * Azure Docs.

+ * * @param subDirectoryName Name of the subdirectory * @param metadata Optional metadata to associate with the subdirectory * @return A response containing the subdirectory client and the status of creating the directory. @@ -284,6 +317,9 @@ public Response createSubDirectory(String subDirectoryName, Map * * {@codesnippet com.azure.storage.file.directoryClient.deleteSubDirectory#string} * + *

For more information, see the + * Azure Docs.

+ * * @param subDirectoryName Name of the subdirectory * @return A response that only contains headers and response status code * @throws StorageErrorException If the subdirectory doesn't exist, the parent directory does not exist or subdirectory name is an invalid resource name. @@ -301,6 +337,9 @@ public VoidResponse deleteSubDirectory(String subDirectoryName) { * * {@codesnippet com.azure.storage.file.directoryClient.createFile#string-long} * + *

For more information, see the + * Azure Docs.

+ * * @param fileName Name of the file * @param maxSize Size of the file * @return A response containing the FileClient and the status of creating the directory. @@ -319,6 +358,9 @@ public Response createFile(String fileName, long maxSize) { * * {@codesnippet com.azure.storage.file.directoryClient.createFile#string-long-fileHTTPHeaders-map} * + *

For more information, see the + * Azure Docs.

+ * * @param fileName Name of the file * @param maxSize Max size of the file * @param httpHeaders the Http headers set to the file @@ -340,6 +382,9 @@ public Response createFile(String fileName, long maxSize, FileHTTPHe * * {@codesnippet com.azure.storage.file.directoryClient.deleteFile#string} * + *

For more information, see the + * Azure Docs.

+ * * @param fileName Name of the file * @return A response that only contains headers and response status code * @throws StorageErrorException If the directory doesn't exist or the file doesn't exist or file name is an invalid resource name. diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileAsyncClient.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileAsyncClient.java index 4105edd38b20..ce3b9b561530 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileAsyncClient.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileAsyncClient.java @@ -140,6 +140,9 @@ public URL getFileUrl() { * * {@codesnippet com.azure.storage.file.fileClient.create} * + *

For more information, see the + * Azure Docs.

+ * * @param maxSize The maximum size in bytes for the file, up to 1 TiB. * @return A response containing the file info and the status of creating the file. * @throws StorageErrorException If the file has already existed, the parent directory does not exist or fileName is an invalid resource name. @@ -157,10 +160,13 @@ public Mono> create(long maxSize) { * * {@codesnippet com.azure.storage.file.fileAsyncClient.create#long-filehttpheaders-map} * + *

For more information, see the + * Azure Docs.

+ * * @param maxSize The maximum size in bytes for the file, up to 1 TiB. * @param httpHeaders Additional parameters for the operation. * @param metadata Optional name-value pairs associated with the file as metadata. Metadata names must adhere to the naming rules. - * @see C# identifiers + * @see C# identifiers * @return A response containing the directory info and the status of creating the directory. * @throws StorageErrorException If the directory has already existed, the parent directory does not exist or directory is an invalid resource name. */ @@ -178,9 +184,12 @@ public Mono> create(long maxSize, FileHTTPHeaders httpHeaders * * {@codesnippet com.azure.storage.file.fileAsyncClient.startCopy#string-map} * + *

For more information, see the + * Azure Docs.

+ * * @param sourceUrl Specifies the URL of the source file or blob, up to 2 KB in length. * @param metadata Optional name-value pairs associated with the file as metadata. Metadata names must adhere to the naming rules. - * * @see C# identifiers + * @see C# identifiers * @return A response containing the file copy info and the status of copying the file. */ public Mono> startCopy(String sourceUrl, Map metadata) { @@ -197,6 +206,9 @@ public Mono> startCopy(String sourceUrl, MapFor more information, see the + * Azure Docs.

+ * * @param copyId Specifies the copy id which has copying pending status associate with it. * @return A response containing the status of aborting copy the file. */ @@ -214,6 +226,9 @@ public Mono abortCopy(String copyId) { * * {@codesnippet com.azure.storage.file.fileAsyncClient.downloadToFile#string} * + *

For more information, see the + * Azure Docs.

+ * * @param downloadFilePath The path where store the downloaded file * @return An empty response. */ @@ -230,6 +245,9 @@ public Mono downloadToFile(String downloadFilePath) { * * {@codesnippet com.azure.storage.file.fileAsyncClient.downloadToFile#string-filerange} * + *

For more information, see the + * Azure Docs.

+ * * @param downloadFilePath The path where store the downloaded file * @param range Optional byte range which returns file data only from the specified range. * @return An empty response. @@ -297,6 +315,9 @@ private Flux sliceFileRange(FileRange fileRange) { * * {@codesnippet com.azure.storage.file.fileAsyncClient.downloadWithProperties} * + *

For more information, see the + * Azure Docs.

+ * * @return A response that only contains headers and response status code */ public Mono> downloadWithProperties() { @@ -312,6 +333,9 @@ public Mono> downloadWithProperties() { * * {@codesnippet com.azure.storage.file.fileAsyncClient.downloadWithProperties#filerange-boolean} * + *

For more information, see the + * Azure Docs.

+ * * @param range Optional byte range which returns file data only from the specified range. * @param rangeGetContentMD5 Optional boolean which the service returns the MD5 hash for the range when it sets to true, as long as the range is less than or equal to 4 MB in size. * @return A response that only contains headers and response status code @@ -331,6 +355,9 @@ public Mono> downloadWithProperties(FileRange range, * * {@codesnippet com.azure.storage.file.fileAsyncClient.delete} * + *

For more information, see the + * Azure Docs.

+ * * @return A response that only contains headers and response status code * @throws StorageErrorException If the directory doesn't exist or the file doesn't exist. */ @@ -349,6 +376,9 @@ public Mono delete() { * * {@codesnippet com.azure.storage.file.fileAsyncClient.getProperties} * + *

For more information, see the + * Azure Docs.

+ * * @return Storage file properties */ public Mono> getProperties() { @@ -371,6 +401,9 @@ public Mono> getProperties() { * * {@codesnippet com.azure.storage.file.fileAsyncClient.setHttpHeaders#long-filehttpheaders.clearHttpHeaders} * + *

For more information, see the + * Azure Docs.

+ * * @param newFileSize New file size of the file * @param httpHeaders Resizes a file to the specified size. If the specified byte value is less than the current size of the file, then all ranges above the specified byte value are cleared. * @return Response of the information about the file @@ -396,13 +429,16 @@ public Mono> setHttpHeaders(long newFileSize, FileHTTPHeaders * * {@codesnippet com.azure.storage.file.fileAsyncClient.setMetadata#map.clearMetadata} * + *

For more information, see the + * Azure Docs.

+ * * @param metadata Options.Metadata to set on the file, if null is passed the metadata for the file is cleared * @return information about the file * @throws StorageErrorException If the file doesn't exist or the metadata contains invalid keys */ public Mono> setMetadata(Map metadata) { return azureFileStorageClient.files().setMetadataWithRestResponseAsync(shareName, filePath, null, metadata, Context.NONE) - .map(this::setMeatadataResponse); + .map(this::setMetadataResponse); } /** @@ -414,6 +450,9 @@ public Mono> setMetadata(Map metadata * * {@codesnippet com.azure.storage.file.fileAsyncClient.upload#flux-long} * + *

For more information, see the + * Azure Docs.

+ * * @param data The data which will upload to the storage file. * @param length Specifies the number of bytes being transmitted in the request body. When the FileRangeWriteType is set to clear, the value of this header must be set to zero.. * @return A response that only contains headers and response status code @@ -434,6 +473,9 @@ public Mono> upload(Flux data, long length) { * * {@codesnippet com.azure.storage.file.fileAsyncClient.upload#bytebuf-long-int-filerangewritetype} * + *

For more information, see the + * Azure Docs.

+ * * @param data The data which will upload to the storage file. * @param offset Optional starting point of the upload range. It will start from the beginning if it is {@code null} * @param length Specifies the number of bytes being transmitted in the request body. When the FileRangeWriteType is set to clear, the value of this header must be set to zero. @@ -460,6 +502,11 @@ public Mono> upload(Flux data, long length, lo * * {@codesnippet com.azure.storage.file.fileAsyncClient.uploadFromFile#string} * + *

For more information, see the + * Azure Docs Create File + * and + * Azure Docs Upload.

+ * * @param uploadFilePath The path where store the source file to upload * @return An empty response. */ @@ -476,6 +523,11 @@ public Mono uploadFromFile(String uploadFilePath) { * * (@codesnippet com.azure.storage.file.fileAsyncClient.uploadFromFile#string-filerangewritetype} * + *

For more information, see the + * Azure Docs Create File + * and + * Azure Docs Upload.

+ * * @param uploadFilePath The path where store the source file to upload * @param type You may specify one of the following options: *
    @@ -521,6 +573,9 @@ private List sliceFile(String path) { * * {@codesnippet com.azure.storage.file.fileAsyncClient.listRanges} * + *

    For more information, see the + * Azure Docs.

    + * * @return {@link FileRange ranges} in the files. */ public Flux listRanges() { @@ -537,6 +592,9 @@ public Flux listRanges() { * * {@codesnippet com.azure.storage.file.fileAsyncClient.listRanges#filerange} * + *

    For more information, see the + * Azure Docs.

    + * * @param range Optional byte range which returns file data only from the specified range. * @return {@link FileRange ranges} in the files that satisfy the requirements */ @@ -555,6 +613,9 @@ public Flux listRanges(FileRange range) { * * {@codesnippet com.azure.storage.file.fileAsyncClient.listHandles} * + *

    For more information, see the + * Azure Docs.

    + * * @return {@link HandleItem handles} in the files that satisfy the requirements */ public Flux listHandles() { @@ -570,6 +631,9 @@ public Flux listHandles() { * * {@codesnippet com.azure.storage.file.fileAsyncClient.listHandles#integer} * + *

    For more information, see the + * Azure Docs.

    + * * @param maxResults Optional maximum number of results will return per page * @return {@link HandleItem handles} in the file that satisfy the requirements */ @@ -589,6 +653,9 @@ public Flux listHandles(Integer maxResults) { * * {@codesnippet com.azure.storage.file.fileAsyncClient.forceCloseHandles#string} * + *

    For more information, see the + * Azure Docs.

    + * * @param handleId Specifies the handle ID to be closed. Use an asterisk ('*') as a wildcard string to specify all handles. * @return The counts of number of handles closed */ @@ -717,7 +784,7 @@ private Response uploadResponse(final FilesUploadRangeResponse r return new SimpleResponse<>(response, fileUploadInfo); } - private Response setMeatadataResponse(final FilesSetMetadataResponse response) { + private Response setMetadataResponse(final FilesSetMetadataResponse response) { String eTag = response.deserializedHeaders().eTag(); boolean isServerEncrypted = response.deserializedHeaders().isServerEncrypted(); FileMetadataInfo fileMetadataInfo = new FileMetadataInfo(eTag, isServerEncrypted); diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileClient.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileClient.java index 4736673bee43..b8de3708e898 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileClient.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileClient.java @@ -68,6 +68,9 @@ public URL getFileUrl() { * * {@codesnippet com.azure.storage.file.fileClient.create} * + *

    For more information, see the + * Azure Docs.

    + * * @param maxSize The maximum size in bytes for the file, up to 1 TiB. * @return A response containing the file info and the status of creating the file. * @throws StorageErrorException If the file has already existed, the parent directory does not exist or fileName is an invalid resource name. @@ -85,10 +88,13 @@ public Response create(long maxSize) { * * {@codesnippet com.azure.storage.file.fileClient.create#long-filehttpheaders-map} * + *

    For more information, see the + * Azure Docs.

    + * * @param maxSize The maximum size in bytes for the file, up to 1 TiB. * @param httpHeaders Additional parameters for the operation. * @param metadata Optional name-value pairs associated with the file as metadata. Metadata names must adhere to the naming rules. - * @see C# identifiers + * @see C# identifiers * @return A response containing the directory info and the status of creating the directory. * @throws StorageErrorException If the directory has already existed, the parent directory does not exist or directory is an invalid resource name. */ @@ -105,6 +111,9 @@ public Response create(long maxSize, FileHTTPHeaders httpHeaders, Map< * * {@codesnippet com.azure.storage.file.fileClient.startCopy#string-map} * + *

    For more information, see the + * Azure Docs.

    + * * @param sourceUrl Specifies the URL of the source file or blob, up to 2 KB in length. * @param metadata Optional name-value pairs associated with the file as metadata. Metadata names must adhere to the naming rules. * @see C# identifiers @@ -123,6 +132,9 @@ public Response startCopy(String sourceUrl, Map me * * {@codesnippet com.azure.storage.file.fileClient.abortCopy#string} * + *

    For more information, see the + * Azure Docs.

    + * * @param copyId Specifies the copy id which has copying pending status associate with it. * @return A response containing the status of aborting copy the file. */ @@ -139,6 +151,9 @@ public VoidResponse abortCopy(String copyId) { * * {@codesnippet com.azure.storage.file.fileClient.downloadToFile#string} * + *

    For more information, see the + * Azure Docs.

    + * * @param downloadFilePath The path where store the downloaded file */ public void downloadToFile(String downloadFilePath) { @@ -154,6 +169,9 @@ public void downloadToFile(String downloadFilePath) { * * {@codesnippet com.azure.storage.file.fileClient.downloadToFile#string-filerange} * + *

    For more information, see the + * Azure Docs.

    + * * @param downloadFilePath The path where store the downloaded file * @param range Optional byte range which returns file data only from the specified range. */ @@ -170,6 +188,9 @@ public void downloadToFile(String downloadFilePath, FileRange range) { * * {@codesnippet com.azure.storage.file.fileClient.downloadWithProperties} * + *

    For more information, see the + * Azure Docs.

    + * * @return A response that only contains headers and response status code */ public Response downloadWithProperties() { @@ -185,6 +206,9 @@ public Response downloadWithProperties() { * * {@codesnippet com.azure.storage.file.fileClient.downloadWithProperties#filerange-boolean} * + *

    For more information, see the + * Azure Docs.

    + * * @param range Optional byte range which returns file data only from the specified range. * @param rangeGetContentMD5 Optional boolean which the service returns the MD5 hash for the range when it sets to true, as long as the range is less than or equal to 4 MB in size. * @return A response that only contains headers and response status code @@ -202,6 +226,9 @@ public Response downloadWithProperties(FileRange range, Boolea * * {@codesnippet com.azure.storage.file.fileClient.delete} * + *

    For more information, see the + * Azure Docs.

    + * * @return A response that only contains headers and response status code * @throws StorageErrorException If the directory doesn't exist or the file doesn't exist. */ @@ -219,6 +246,9 @@ public VoidResponse delete() { * * {@codesnippet com.azure.storage.file.fileClient.getProperties} * + *

    For more information, see the + * Azure Docs.

    + * * @return Storage file properties */ public Response getProperties() { @@ -240,6 +270,9 @@ public Response getProperties() { * * {@codesnippet com.azure.storage.file.fileClient.setHttpHeaders#long-filehttpheaders.clearHttpHeaders} * + *

    For more information, see the + * Azure Docs.

    + * * @param newFileSize New file size of the file * @param httpHeaders Resizes a file to the specified size. If the specified byte value is less than the current size of the file, then all ranges above the specified byte value are cleared. * @return Response of the information about the file @@ -264,6 +297,9 @@ public Response setHttpHeaders(long newFileSize, FileHTTPHeaders httpH * * {@codesnippet com.azure.storage.file.fileClient.setMetadata#map.clearMetadata} * + *

    For more information, see the + * Azure Docs.

    + * * @param metadata Options.Metadata to set on the file, if null is passed the metadata for the file is cleared * @return information about the file * @throws StorageErrorException If the file doesn't exist or the metadata contains invalid keys @@ -281,6 +317,9 @@ public Response setMetadata(Map metadata) { * * {@codesnippet com.azure.storage.file.fileClient.upload#flux-long} * + *

    For more information, see the + * Azure Docs.

    + * * @param data The data which will upload to the storage file. * @param length Specifies the number of bytes being transmitted in the request body. When the FileRangeWriteType is set to clear, the value of this header must be set to zero.. * @return A response that only contains headers and response status code @@ -299,6 +338,9 @@ public Response upload(ByteBuf data, long length) { * * {@codesnippet com.azure.storage.file.fileClient.upload#bytebuf-long-int-filerangewritetype} * + *

    For more information, see the + * Azure Docs.

    + * * @param data The data which will upload to the storage file. * @param offset Optional starting point of the upload range. It will start from the beginning if it is {@code null} * @param length Specifies the number of bytes being transmitted in the request body. When the FileRangeWriteType is set to clear, the value of this header must be set to zero. @@ -323,6 +365,11 @@ public Response upload(ByteBuf data, long length, int offset, Fi * * {@codesnippet com.azure.storage.file.fileClient.uploadFromFile#string} * + *

    For more information, see the + * Azure Docs Create File + * and + * Azure Docs Upload.

    + * * @param uploadFilePath The path where store the source file to upload */ public void uploadFromFile(String uploadFilePath) { @@ -338,6 +385,11 @@ public void uploadFromFile(String uploadFilePath) { * * {@codesnippet com.azure.storage.file.fileClient.uploadFromFile#string-filerangewritetype} * + *

    For more information, see the + * Azure Docs Create File + * and + * Azure Docs Upload.

    + * * @param uploadFilePath The path where store the source file to upload * @param type You may specify one of the following options: *
      @@ -358,6 +410,9 @@ public void uploadFromFile(String uploadFilePath, FileRangeWriteType type) { * * {@codesnippet com.azure.storage.file.fileClient.listRanges} * + *

      For more information, see the + * Azure Docs.

      + * * @return {@link FileRange ranges} in the files. */ public Iterable listRanges() { @@ -373,6 +428,9 @@ public Iterable listRanges() { * * {@codesnippet com.azure.storage.file.fileClient.listRanges#filerange} * + *

      For more information, see the + * Azure Docs.

      + * * @param range Optional byte range which returns file data only from the specified range. * @return {@link FileRange ranges} in the files that satisfy the requirements */ @@ -389,6 +447,9 @@ public Iterable listRanges(FileRange range) { * * {@codesnippet com.azure.storage.file.fileClient.listHandles} * + *

      For more information, see the + * Azure Docs.

      + * * @return {@link HandleItem handles} in the files that satisfy the requirements */ public Iterable listHandles() { @@ -404,6 +465,9 @@ public Iterable listHandles() { * * {@codesnippet com.azure.storage.file.fileClient.listHandles#integer} * + *

      For more information, see the + * Azure Docs.

      + * * @param maxResults Optional max number of results returned per page * @return {@link HandleItem handles} in the file that satisfy the requirements */ @@ -422,6 +486,9 @@ public Iterable listHandles(Integer maxResults) { * * {@codesnippet com.azure.storage.file.fileClient.forceCloseHandles#string} * + *

      For more information, see the + * Azure Docs.

      + * * @param handleId Specifies the handle ID to be closed. Use an asterisk ('*') as a wildcard string to specify all handles. * @return The counts of number of handles closed */ diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceAsyncClient.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceAsyncClient.java index 981b78a4ace5..e545c18965a5 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceAsyncClient.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceAsyncClient.java @@ -99,6 +99,9 @@ public ShareAsyncClient getShareAsyncClient(String shareName) { * * {@codesnippet com.azure.storage.file.fileServiceAsyncClient.listShares} * + *

      For more information, see the + * Azure Docs.

      + * * @return {@link ShareItem Shares} in the storage account without their metadata or snapshots */ public Flux listShares() { @@ -127,6 +130,9 @@ public Flux listShares() { * * {@codesnippet com.azure.storage.file.fileServiceAsyncClient.listShares#ListSharesOptions.metadata.snapshot} * + *

      For more information, see the + * Azure Docs.

      + * * @param options Options for listing shares * @return {@link ShareItem Shares} in the storage account that satisfy the filter requirements */ @@ -196,6 +202,9 @@ private Publisher extractAndFetchShares(ServicesListSharesSegmentResp * * {@codesnippet com.azure.storage.file.fileServiceAsyncClient.getProperties} * + *

      For more information, see the + * Azure Docs.

      + * * @return Storage account File service properties */ public Mono> getProperties() { @@ -220,6 +229,9 @@ public Mono> getProperties() { * * {@codesnippet com.azure.storage.file.fileServiceAsyncClient.setProperties#fileServiceProperties} * + *

      For more information, see the + * Azure Docs.

      + * * @param properties Storage account File service properties * @return A response that only contains headers and response status code * @throws StorageErrorException When one of the following is true @@ -248,6 +260,9 @@ public Mono setProperties(FileServiceProperties properties) { * * {@codesnippet com.azure.storage.file.fileServiceAsyncClient.createShare#string} * + *

      For more information, see the + * Azure Docs.

      + * * @param shareName Name of the share * @return A response containing the ShareAsyncClient and the status of creating the share. * @throws StorageErrorException If a share with the same name already exists @@ -270,6 +285,9 @@ public Mono> createShare(String shareName) { * * {@codesnippet com.azure.storage.file.fileServiceAsyncClient.createShare#string-map-integer.quota} * + *

      For more information, see the + * Azure Docs.

      + * * @param shareName Name of the share * @param metadata Optional metadata to associate with the share * @param quotaInGB Optional maximum size the share is allowed to grow to in GB. This must be greater than 0 and @@ -294,6 +312,9 @@ public Mono> createShare(String shareName, MapFor more information, see the + * Azure Docs.

      + * * @param shareName Name of the share * @return A response that only contains headers and response status code * @throws StorageErrorException If the share doesn't exist @@ -312,6 +333,9 @@ public Mono deleteShare(String shareName) { * * {@codesnippet com.azure.storage.file.fileServiceAsyncClient.deleteShare#string-string} * + *

      For more information, see the + * Azure Docs.

      + * * @param shareName Name of the share * @param snapshot Identifier of the snapshot * @return A response that only contains headers and response status code diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceClient.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceClient.java index 2dd4656926e1..f1603d94c448 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceClient.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/FileServiceClient.java @@ -75,6 +75,9 @@ public ShareClient getShareClient(String shareName) { * * {@codesnippet com.azure.storage.file.fileServiceClient.listShares} * + *

      For more information, see the + * Azure Docs.

      + * * @return {@link ShareItem Shares} in the storage account without their metadata or snapshots */ public Iterable listShares() { @@ -103,6 +106,9 @@ public Iterable listShares() { * * {@codesnippet com.azure.storage.file.fileServiceClient.listShares#ListSharesOptions.metadata.snapshot} * + *

      For more information, see the + * Azure Docs.

      + * * @param options Options for listing shares * @return {@link ShareItem Shares} in the storage account that satisfy the filter requirements */ @@ -120,6 +126,9 @@ public Iterable listShares(ListSharesOptions options) { * * {@codesnippet com.azure.storage.file.fileServiceClient.getProperties} * + *

      For more information, see the + * Azure Docs.

      + * * @return Storage account File service properties */ public Response getProperties() { @@ -143,6 +152,9 @@ public Response getProperties() { * * {@codesnippet com.azure.storage.file.fileServiceClient.setProperties#fileServiceProperties} * + *

      For more information, see the + * Azure Docs.

      + * * @param properties Storage account File service properties * @return A response that only contains headers and response status code * @throws StorageErrorException When one of the following is true @@ -167,8 +179,12 @@ public VoidResponse setProperties(FileServiceProperties properties) { *

      Code Samples

      * *

      Create the share with share name of "myshare"

      + * * {@codesnippet com.azure.storage.file.fileServiceClient.createShare#string} * + *

      For more information, see the + * Azure Docs.

      + * * @param shareName Name of the share * @return A response containing the ShareClient and the status of creating the share. * @throws StorageErrorException If a share with the same name already exists @@ -191,6 +207,9 @@ public Response createShare(String shareName) { * * {@codesnippet com.azure.storage.file.fileServiceClient.createShare#string-map-integer.quota} * + *

      For more information, see the + * Azure Docs.

      + * * @param shareName Name of the share * @param metadata Optional metadata to associate with the share * @param quotaInGB Optional maximum size the share is allowed to grow to in GB. This must be greater than 0 and @@ -213,6 +232,9 @@ public Response createShare(String shareName, Map m * * {@codesnippet com.azure.storage.file.fileServiceClient.deleteShare#string} * + *

      For more information, see the + * Azure Docs.

      + * * @param shareName Name of the share * @return A response that only contains headers and response status code * @throws StorageErrorException If the share doesn't exist @@ -231,6 +253,9 @@ public VoidResponse deleteShare(String shareName) { * * {@codesnippet com.azure.storage.file.fileServiceClient.deleteShare#string-string} * + *

      For more information, see the + * Azure Docs.

      + * * @param shareName Name of the share * @param snapshot Identifier of the snapshot * @return A response that only contains headers and response status code diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/ShareAsyncClient.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/ShareAsyncClient.java index 789baa8a8181..eed4f7cb9190 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/ShareAsyncClient.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/ShareAsyncClient.java @@ -134,6 +134,9 @@ public DirectoryAsyncClient getDirectoryClient(String directoryName) { * * {@codesnippet com.azure.storage.file.shareAsyncClient.create} * + *

      For more information, see the + * Azure Docs.

      + * * @return A response containing information about the share and the status its creation. * @throws StorageErrorException If the share already exists with different metadata */ @@ -154,6 +157,9 @@ public Mono> create() { * * {@codesnippet com.azure.storage.file.shareAsyncClient.create#map-integer.quota} * + *

      For more information, see the + * Azure Docs.

      + * * @param metadata Optional metadata to associate with the share * @param quotaInGB Optional maximum size the share is allowed to grow to in GB. This must be greater than 0 and * less than or equal to 5120. The default value is 5120. @@ -175,6 +181,9 @@ public Mono> create(Map metadata, Integer qu * * {@codesnippet com.azure.storage.file.shareAsyncClient.createSnapshot} * + *

      For more information, see the + * Azure Docs.

      + * * @return A response containing information about the snapshot of share. * @throws StorageErrorException If the share doesn't exist, there are 200 snapshots of the share, or a snapshot is * in progress for the share @@ -192,6 +201,9 @@ public Mono> createSnapshot() { * * {@codesnippet com.azure.storage.file.shareAsyncClient.createSnapshot#map} * + *

      For more information, see the + * Azure Docs.

      + * * @param metadata Optional metadata to associate with the snapshot. If {@code null} the metadata of the share * will be copied to the snapshot. * @return A response containing information about the snapshot of share. @@ -212,6 +224,9 @@ public Mono> createSnapshot(Map meta * * {@codesnippet com.azure.storage.file.shareAsyncClient.delete} * + *

      For more information, see the + * Azure Docs.

      + * * @return A response that only contains headers and response status code * @throws StorageErrorException If the share doesn't exist */ @@ -230,6 +245,9 @@ public Mono delete() { * * {@codesnippet com.azure.storage.file.shareAsyncClient.getProperties} * + *

      For more information, see the + * Azure Docs.

      + * * @return the properties of the share * @throws StorageErrorException If the share doesn't exist */ @@ -247,6 +265,9 @@ public Mono> getProperties() { * * {@codesnippet com.azure.storage.file.shareAsyncClient.setQuota} * + *

      For more information, see the + * Azure Docs.

      + * * @param quotaInGB Size in GB to limit the share's growth. The quota in GB must be between 1 and 5120. * @return information about the share * @throws StorageErrorException If the share doesn't exist or {@code quotaInGB} is outside the allowed bounds @@ -271,6 +292,9 @@ public Mono> setQuota(int quotaInGB) { * * {@codesnippet com.azure.storage.file.shareAsyncClient.clearMetadata#map} * + *

      For more information, see the + * Azure Docs.

      + * * @param metadata Metadata to set on the share, if null is passed the metadata for the share is cleared * @return information about the share * @throws StorageErrorException If the share doesn't exist or the metadata contains invalid keys @@ -289,6 +313,9 @@ public Mono> setMetadata(Map metadata) { * * {@codesnippet com.azure.storage.file.shareAsyncClient.getAccessPolicy} * + *

      For more information, see the + * Azure Docs.

      + * * @return The stored access policies specified on the queue. * @throws StorageErrorException If the share doesn't exist */ @@ -306,6 +333,9 @@ public Flux getAccessPolicy() { * * {@codesnippet com.azure.storage.file.shareAsyncClient.setAccessPolicy} * + *

      For more information, see the + * Azure Docs.

      + * * @param permissions Access policies to set on the queue * @return A response that only contains headers and response status code * @throws StorageErrorException If the share doesn't exist, a stored access policy doesn't have all fields filled out, @@ -325,6 +355,9 @@ public Mono> setAccessPolicy(List permissi * * {@codesnippet com.azure.storage.file.shareAsyncClient.getStatistics} * + *

      For more information, see the + * Azure Docs.

      + * * @return the storage statistics of the share */ public Mono> getStatistics() { @@ -340,7 +373,10 @@ public Mono> getStatistics() { *

      Create the directory "mydirectory"

      * * {@codesnippet com.azure.storage.file.shareAsyncClient.createDirectory#string} - * * + * + *

      For more information, see the + * Azure Docs.

      + * * @param directoryName Name of the directory * @return A response containing a {@link DirectoryAsyncClient} to interact with the created directory and the * status of its creation. @@ -360,6 +396,9 @@ public Mono> createDirectory(String directoryName * * {@codesnippet com.azure.storage.file.shareAsyncClient.createDirectory#string-map} * + *

      For more information, see the + * Azure Docs.

      + * * @param directoryName Name of the directory * @param metadata Optional metadata to associate with the directory * @return A response containing a {@link DirectoryAsyncClient} to interact with the created directory and the @@ -382,6 +421,9 @@ public Mono> createDirectory(String directoryName * * {@codesnippet com.azure.storage.file.shareAsyncClient.deleteDirectory#string} * + *

      For more information, see the + * Azure Docs.

      + * * @param directoryName Name of the directory * @return A response that only contains headers and response status code * @throws StorageErrorException If the share doesn't exist or the directory isn't empty diff --git a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/ShareClient.java b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/ShareClient.java index 2d5c1859eee2..d5c5ee54b5eb 100644 --- a/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/ShareClient.java +++ b/sdk/storage/azure-storage-file/src/main/java/com/azure/storage/file/ShareClient.java @@ -84,6 +84,9 @@ public DirectoryClient getDirectoryClient(String directoryName) { * * {@codesnippet com.azure.storage.file.shareClient.create} * + *

      For more information, see the + * Azure Docs.

      + * * @return A response containing information about the share and the status its creation. * @throws StorageErrorException If the share already exists with different metadata */ @@ -104,6 +107,9 @@ public Response create() { * * {@codesnippet com.azure.storage.file.shareClient.create#map-integer.quota} * + *

      For more information, see the + * Azure Docs.

      + * * @param metadata Optional metadata to associate with the share * @param quotaInGB Optional maximum size the share is allowed to grow to in GB. This must be greater than 0 and * less than or equal to 5120. The default value is 5120. @@ -122,7 +128,9 @@ public Response create(Map metadata, Integer quotaInG * *

      Create a snapshot

      * - * {@codesnippet com.azure.storage.file.shareClient.createSnapshot} + * + *

      For more information, see the + * Azure Docs.

      * * @return A response containing information about the snapshot of share. * @throws StorageErrorException If the share doesn't exist, there are 200 snapshots of the share, or a snapshot is @@ -141,6 +149,9 @@ public Response createSnapshot() { * * {@codesnippet com.azure.storage.file.shareClient.createSnapshot#map} * + *

      For more information, see the + * Azure Docs.

      + * * @param metadata Optional metadata to associate with the snapshot. If {@code null} the metadata of the share * will be copied to the snapshot. * @return A response containing information about the snapshot of share. @@ -160,6 +171,9 @@ public Response createSnapshot(Map metadata) * * {@codesnippet com.azure.storage.file.shareClient.delete} * + *

      For more information, see the + * Azure Docs.

      + * * @return A response that only contains headers and response status code * @throws StorageErrorException If the share doesn't exist */ @@ -177,6 +191,9 @@ public VoidResponse delete() { * * {@codesnippet com.azure.storage.file.shareClient.getProperties} * + *

      For more information, see the + * Azure Docs.

      + * * @return the properties of the share * @throws StorageErrorException If the share doesn't exist */ @@ -193,6 +210,9 @@ public Response getProperties() { * * {@codesnippet com.azure.storage.file.shareClient.setQuota} * + *

      For more information, see the + * Azure Docs.

      + * * @param quotaInGB Size in GB to limit the share's growth. The quota in GB must be between 1 and 5120. * @return information about the share * @throws StorageErrorException If the share doesn't exist or {@code quotaInGB} is outside the allowed bounds @@ -216,6 +236,9 @@ public Response setQuota(int quotaInGB) { * * {@codesnippet com.azure.storage.file.shareClient.clearMetadata#map} * + *

      For more information, see the + * Azure Docs.

      + * * @param metadata Metadata to set on the share, if null is passed the metadata for the share is cleared * @return information about the share * @throws StorageErrorException If the share doesn't exist or the metadata contains invalid keys @@ -233,6 +256,9 @@ public Response setMetadata(Map metadata) { * * {@codesnippet com.azure.storage.file.shareClient.getAccessPolicy} * + *

      For more information, see the + * Azure Docs.

      + * * @return The stored access policies specified on the queue. * @throws StorageErrorException If the share doesn't exist */ @@ -249,6 +275,9 @@ public Iterable getAccessPolicy() { * * {@codesnippet com.azure.storage.file.shareClient.setAccessPolicy} * + *

      For more information, see the + * Azure Docs.

      + * * @param permissions Access policies to set on the queue * @return A response that only contains headers and response status code * @throws StorageErrorException If the share doesn't exist, a stored access policy doesn't have all fields filled out, @@ -267,6 +296,9 @@ public Response setAccessPolicy(List permissions) { * * {@codesnippet com.azure.storage.file.shareClient.getStatistics} * + *

      For more information, see the + * Azure Docs.

      + * * @return the storage statistics of the share */ public Response getStatistics() { @@ -282,6 +314,9 @@ public Response getStatistics() { * * {@codesnippet com.azure.storage.file.shareClient.createDirectory#string} * + *

      For more information, see the + * Azure Docs.

      + * * @param directoryName Name of the directory * @return A response containing a {@link DirectoryClient} to interact with the created directory and the * status of its creation. @@ -301,6 +336,9 @@ public Response createDirectory(String directoryName) { * * {@codesnippet com.azure.storage.file.shareClient.createDirectory#string-map} * + *

      For more information, see the + * Azure Docs.

      + * * @param directoryName Name of the directory * @param metadata Optional metadata to associate with the directory * @return A response containing a {@link DirectoryAsyncClient} to interact with the created directory and the @@ -323,6 +361,9 @@ public Response createDirectory(String directoryName, MapFor more information, see the + * Azure Docs.

      + * * @param directoryName Name of the directory * @return A response that only contains headers and response status code * @throws StorageErrorException If the share doesn't exist or the directory isn't empty