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

934 строки
121 KiB
YAML

### YamlMime:JavaType
uid: "com.azure.storage.file.share.ShareDirectoryClient"
fullName: "com.azure.storage.file.share.ShareDirectoryClient"
name: "ShareDirectoryClient"
nameWithType: "ShareDirectoryClient"
summary: "This class provides a client that contains all the operations for interacting with directory in 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 **ShareDirectoryClient**"
methods:
- uid: "com.azure.storage.file.share.ShareDirectoryClient.create()"
fullName: "com.azure.storage.file.share.ShareDirectoryClient.create()"
name: "create()"
nameWithType: "ShareDirectoryClient.create()"
summary: "Creates a directory in the file share and returns a response of <xref uid=\"com.azure.storage.file.share.models.ShareDirectoryInfo\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareDirectoryInfo\"></xref> to interact with it."
syntax: "public ShareDirectoryInfo create()"
desc: "Creates a directory in the file share and returns a response of <xref uid=\"com.azure.storage.file.share.models.ShareDirectoryInfo\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareDirectoryInfo\"></xref> to interact with it.\n\n**Code Samples**\n\nCreate the directory\n\n```java\nshareDirectoryClient.create();\n System.out.println(\"Completed creating the directory. \");\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/create-directory"
returns:
description: "The <xref uid=\"com.azure.storage.file.share.models.ShareDirectoryInfo\" data-throw-if-not-resolved=\"false\" data-raw-source=\"directory info\"></xref>."
type: "<xref href=\"com.azure.storage.file.share.models.ShareDirectoryInfo?alt=com.azure.storage.file.share.models.ShareDirectoryInfo&text=ShareDirectoryInfo\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.storage.file.share.ShareDirectoryClient.createFile(java.lang.String,long)"
fullName: "com.azure.storage.file.share.ShareDirectoryClient.createFile(String fileName, long maxSize)"
name: "createFile(String fileName, long maxSize)"
nameWithType: "ShareDirectoryClient.createFile(String fileName, long maxSize)"
summary: "Creates a file in this directory with specific name, max number of results and returns a response of Share<wbr>Directory<wbr>Info to interact with it."
parameters:
- description: "Name of the file"
name: "fileName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "Size of the file"
name: "maxSize"
type: "<xref href=\"long?alt=long&text=long\" data-throw-if-not-resolved=\"False\" />"
syntax: "public ShareFileClient createFile(String fileName, long maxSize)"
desc: "Creates a file in this directory with specific name, max number of results and returns a response of ShareDirectoryInfo to interact with it.\n\n**Code Samples**\n\nCreate 1k file with named \"myFile\"\n\n```java\nShareFileClient response = shareDirectoryClient.createFile(\"myfile\", 1024);\n System.out.println(\"Completed creating the file: \" + response);\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 ShareFileClient"
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.ShareDirectoryClient.createFileWithResponse(java.lang.String,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.ShareDirectoryClient.createFileWithResponse(String fileName, long maxSize, ShareFileHttpHeaders httpHeaders, FileSmbProperties smbProperties, String filePermission, Map<String,String> metadata, ShareRequestConditions requestConditions, Duration timeout, Context context)"
name: "createFileWithResponse(String fileName, long maxSize, ShareFileHttpHeaders httpHeaders, FileSmbProperties smbProperties, String filePermission, Map<String,String> metadata, ShareRequestConditions requestConditions, Duration timeout, Context context)"
nameWithType: "ShareDirectoryClient.createFileWithResponse(String fileName, long maxSize, ShareFileHttpHeaders httpHeaders, FileSmbProperties smbProperties, String filePermission, Map<String,String> metadata, ShareRequestConditions requestConditions, Duration timeout, Context context)"
summary: "Creates a file in this directory with specific name and returns a response of Share<wbr>Directory<wbr>Info to interact with it."
parameters:
- description: "Name of the file"
name: "fileName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "Max size of 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<ShareFileClient> createFileWithResponse(String fileName, long maxSize, ShareFileHttpHeaders httpHeaders, FileSmbProperties smbProperties, String filePermission, Map<String,String> metadata, ShareRequestConditions requestConditions, Duration timeout, Context context)"
desc: "Creates a file in this directory with specific name and returns a response of ShareDirectoryInfo to interact with it.\n\n**Code Samples**\n\nCreate the file named \"myFile\"\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<ShareFileClient> response = shareDirectoryClient.createFileWithResponse(\"myFile\", 1024,\n httpHeaders, smbProperties, filePermission, Collections.singletonMap(\"directory\", \"metadata\"),\n requestConditions, Duration.ofSeconds(1), new Context(key1, value1));\n System.out.println(\"Completed creating 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/create-file"
returns:
description: "A response containing the directory info and the status of creating the directory."
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.ShareDirectoryClient.createFileWithResponse(java.lang.String,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.ShareDirectoryClient.createFileWithResponse(String fileName, long maxSize, ShareFileHttpHeaders httpHeaders, FileSmbProperties smbProperties, String filePermission, Map<String,String> metadata, Duration timeout, Context context)"
name: "createFileWithResponse(String fileName, long maxSize, ShareFileHttpHeaders httpHeaders, FileSmbProperties smbProperties, String filePermission, Map<String,String> metadata, Duration timeout, Context context)"
nameWithType: "ShareDirectoryClient.createFileWithResponse(String fileName, long maxSize, ShareFileHttpHeaders httpHeaders, FileSmbProperties smbProperties, String filePermission, Map<String,String> metadata, Duration timeout, Context context)"
summary: "Creates a file in this directory with specific name and returns a response of Share<wbr>Directory<wbr>Info to interact with it."
parameters:
- description: "Name of the file"
name: "fileName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "Max size of 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<ShareFileClient> createFileWithResponse(String fileName, long maxSize, ShareFileHttpHeaders httpHeaders, FileSmbProperties smbProperties, String filePermission, Map<String,String> metadata, Duration timeout, Context context)"
desc: "Creates a file in this directory with specific name and returns a response of ShareDirectoryInfo to interact with it.\n\n**Code Samples**\n\nCreate the file named \"myFile\"\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<ShareFileClient> response = shareDirectoryClient.createFileWithResponse(\"myFile\", 1024,\n httpHeaders, smbProperties, filePermission, Collections.singletonMap(\"directory\", \"metadata\"),\n Duration.ofSeconds(1), new Context(key1, value1));\n System.out.println(\"Completed creating 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/create-file"
returns:
description: "A response containing the directory info and the status of creating the directory."
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.ShareDirectoryClient.createIfNotExists()"
fullName: "com.azure.storage.file.share.ShareDirectoryClient.createIfNotExists()"
name: "createIfNotExists()"
nameWithType: "ShareDirectoryClient.createIfNotExists()"
summary: "Creates a directory in the file share if it does not exist."
syntax: "public ShareDirectoryInfo createIfNotExists()"
desc: "Creates a directory in the file share if it does not exist.\n\n**Code Samples**\n\nCreate the directory\n\n```java\nShareDirectoryClient shareDirectoryClient = createClientWithSASToken();\n ShareDirectoryInfo shareDirectoryInfo = shareDirectoryClient.createIfNotExists();\n System.out.printf(\"Last Modified Time:%s\", shareDirectoryInfo.getLastModified());\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/create-directory"
returns:
description: "A <xref uid=\"com.azure.storage.file.share.models.ShareDirectoryInfo\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareDirectoryInfo\"></xref> that contains information about the created directory."
type: "<xref href=\"com.azure.storage.file.share.models.ShareDirectoryInfo?alt=com.azure.storage.file.share.models.ShareDirectoryInfo&text=ShareDirectoryInfo\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.storage.file.share.ShareDirectoryClient.createIfNotExistsWithResponse(com.azure.storage.file.share.options.ShareDirectoryCreateOptions,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareDirectoryClient.createIfNotExistsWithResponse(ShareDirectoryCreateOptions options, Duration timeout, Context context)"
name: "createIfNotExistsWithResponse(ShareDirectoryCreateOptions options, Duration timeout, Context context)"
nameWithType: "ShareDirectoryClient.createIfNotExistsWithResponse(ShareDirectoryCreateOptions options, Duration timeout, Context context)"
summary: "Creates a directory in the file share if it does not exist."
parameters:
- description: "<xref uid=\"com.azure.storage.file.share.options.ShareDirectoryCreateOptions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareDirectoryCreateOptions\"></xref>"
name: "options"
type: "<xref href=\"com.azure.storage.file.share.options.ShareDirectoryCreateOptions?alt=com.azure.storage.file.share.options.ShareDirectoryCreateOptions&text=ShareDirectoryCreateOptions\" 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<ShareDirectoryInfo> createIfNotExistsWithResponse(ShareDirectoryCreateOptions options, Duration timeout, Context context)"
desc: "Creates a directory in the file share if it does not exist.\n\n**Code Samples**\n\nCreate the directory\n\n```java\nShareDirectoryClient directoryClient = createClientWithSASToken();\n FileSmbProperties smbProperties = new FileSmbProperties();\n String filePermission = \"filePermission\";\n ShareDirectoryCreateOptions options = new ShareDirectoryCreateOptions().setSmbProperties(smbProperties)\n .setFilePermission(filePermission).setMetadata(Collections.singletonMap(\"directory\", \"metadata\"));\n\n Response<ShareDirectoryInfo> response = directoryClient.createIfNotExistsWithResponse(options,\n Duration.ofSeconds(1), new Context(key1, value1));\n\n if (response.getStatusCode() == 409) {\n System.out.println(\"Already existed.\");\n } else {\n System.out.printf(\"Create 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/create-directory"
returns:
description: "A reactive <xref uid=\"com.azure.core.http.rest.Response\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Response\"></xref> signaling completion, whose <xref uid=\"com.azure.core.http.rest.Response.getValue*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"value\"></xref> contains a\n <xref uid=\"com.azure.storage.file.share.models.ShareDirectoryInfo\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareDirectoryInfo\"></xref> containing information about the directory. If <xref uid=\"com.azure.core.http.rest.Response\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Response\"></xref>'s status code is 201,\n a new directory was successfully created. If status code is 409, a directory already existed at this location."
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.ShareDirectoryInfo?alt=com.azure.storage.file.share.models.ShareDirectoryInfo&text=ShareDirectoryInfo\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.storage.file.share.ShareDirectoryClient.createSubdirectory(java.lang.String)"
fullName: "com.azure.storage.file.share.ShareDirectoryClient.createSubdirectory(String subdirectoryName)"
name: "createSubdirectory(String subdirectoryName)"
nameWithType: "ShareDirectoryClient.createSubdirectory(String subdirectoryName)"
summary: "Creates a subdirectory under current directory with specific name and returns a response of Share<wbr>Directory<wbr>Client to interact with it."
parameters:
- description: "Name of the subdirectory"
name: "subdirectoryName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public ShareDirectoryClient createSubdirectory(String subdirectoryName)"
desc: "Creates a subdirectory under current directory with specific name and returns a response of ShareDirectoryClient to interact with it.\n\n**Code Samples**\n\nCreate the sub directory \"subdir\"\n\n```java\nshareDirectoryClient.createSubdirectory(\"subdir\");\n System.out.println(\"Completed creating the subdirectory.\");\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/create-directory"
returns:
description: "The subdirectory client."
type: "<xref href=\"com.azure.storage.file.share.ShareDirectoryClient?alt=com.azure.storage.file.share.ShareDirectoryClient&text=ShareDirectoryClient\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.storage.file.share.ShareDirectoryClient.createSubdirectoryIfNotExists(java.lang.String)"
fullName: "com.azure.storage.file.share.ShareDirectoryClient.createSubdirectoryIfNotExists(String subdirectoryName)"
name: "createSubdirectoryIfNotExists(String subdirectoryName)"
nameWithType: "ShareDirectoryClient.createSubdirectoryIfNotExists(String subdirectoryName)"
summary: "Creates a subdirectory under current directory with specified name if it does not exist."
parameters:
- description: "Name of the subdirectory"
name: "subdirectoryName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public ShareDirectoryClient createSubdirectoryIfNotExists(String subdirectoryName)"
desc: "Creates a subdirectory under current directory with specified name if it does not exist.\n\n**Code Samples**\n\nCreate the sub directory \"subdir\"\n\n```java\nShareDirectoryClient subdirectoryClient = shareDirectoryClient.createSubdirectoryIfNotExists(\"subdir\");\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/create-directory"
returns:
description: "A <xref uid=\"com.azure.storage.file.share.ShareDirectoryClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareDirectoryClient\"></xref> used to interact with the subdirectory created."
type: "<xref href=\"com.azure.storage.file.share.ShareDirectoryClient?alt=com.azure.storage.file.share.ShareDirectoryClient&text=ShareDirectoryClient\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.storage.file.share.ShareDirectoryClient.createSubdirectoryIfNotExistsWithResponse(java.lang.String,com.azure.storage.file.share.options.ShareDirectoryCreateOptions,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareDirectoryClient.createSubdirectoryIfNotExistsWithResponse(String subdirectoryName, ShareDirectoryCreateOptions options, Duration timeout, Context context)"
name: "createSubdirectoryIfNotExistsWithResponse(String subdirectoryName, ShareDirectoryCreateOptions options, Duration timeout, Context context)"
nameWithType: "ShareDirectoryClient.createSubdirectoryIfNotExistsWithResponse(String subdirectoryName, ShareDirectoryCreateOptions options, Duration timeout, Context context)"
summary: "Creates a subdirectory under current directory with specific name and metadata if it does not exist."
parameters:
- description: "Name of the subdirectory"
name: "subdirectoryName"
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.ShareDirectoryCreateOptions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareDirectoryCreateOptions\"></xref>"
name: "options"
type: "<xref href=\"com.azure.storage.file.share.options.ShareDirectoryCreateOptions?alt=com.azure.storage.file.share.options.ShareDirectoryCreateOptions&text=ShareDirectoryCreateOptions\" 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<ShareDirectoryClient> createSubdirectoryIfNotExistsWithResponse(String subdirectoryName, ShareDirectoryCreateOptions options, Duration timeout, Context context)"
desc: "Creates a subdirectory under current directory with specific name and metadata if it does not exist.\n\n**Code Samples**\n\nCreate the subdirectory named \"subdir\", with metadata\n\n```java\nFileSmbProperties smbProperties = new FileSmbProperties();\n String filePermission = \"filePermission\";\n ShareDirectoryCreateOptions options = new ShareDirectoryCreateOptions().setSmbProperties(smbProperties)\n .setFilePermission(filePermission).setMetadata(Collections.singletonMap(\"directory\", \"metadata\"));\n\n Response<ShareDirectoryClient> response = shareDirectoryClient\n .createSubdirectoryIfNotExistsWithResponse(\"subdir\", options, Duration.ofSeconds(1),\n new Context(key1, value1));\n if (response.getStatusCode() == 409) {\n System.out.println(\"Already existed.\");\n } else {\n System.out.printf(\"Create 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/create-directory"
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 the <xref uid=\"com.azure.storage.file.share.ShareDirectoryClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareDirectoryClient\"></xref> used\n to interact with the subdirectory created. If <xref uid=\"com.azure.core.http.rest.Response\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Response\"></xref>'s status code is 201, a new subdirectory was\n successfully created. If status code is 409, a subdirectory with the same name already existed at this location."
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.ShareDirectoryClient?alt=com.azure.storage.file.share.ShareDirectoryClient&text=ShareDirectoryClient\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.storage.file.share.ShareDirectoryClient.createSubdirectoryWithResponse(java.lang.String,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.ShareDirectoryClient.createSubdirectoryWithResponse(String subdirectoryName, FileSmbProperties smbProperties, String filePermission, Map<String,String> metadata, Duration timeout, Context context)"
name: "createSubdirectoryWithResponse(String subdirectoryName, FileSmbProperties smbProperties, String filePermission, Map<String,String> metadata, Duration timeout, Context context)"
nameWithType: "ShareDirectoryClient.createSubdirectoryWithResponse(String subdirectoryName, FileSmbProperties smbProperties, String filePermission, Map<String,String> metadata, Duration timeout, Context context)"
summary: "Creates a subdirectory under current directory with specific name , metadata and returns a response of Share<wbr>Directory<wbr>Client to interact with it."
parameters:
- description: "Name of the subdirectory"
name: "subdirectoryName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "The SMB properties of the directory."
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 directory."
name: "filePermission"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "Optional metadata to associate with the subdirectory"
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<ShareDirectoryClient> createSubdirectoryWithResponse(String subdirectoryName, FileSmbProperties smbProperties, String filePermission, Map<String,String> metadata, Duration timeout, Context context)"
desc: "Creates a subdirectory under current directory with specific name , metadata and returns a response of ShareDirectoryClient to interact with it.\n\n**Code Samples**\n\nCreate the subdirectory named \"subdir\", with metadata\n\n```java\nFileSmbProperties smbProperties = new FileSmbProperties();\n String filePermission = \"filePermission\";\n Response<ShareDirectoryClient> response = shareDirectoryClient.createSubdirectoryWithResponse(\"subdir\",\n smbProperties, filePermission, Collections.singletonMap(\"directory\", \"metadata\"),\n Duration.ofSeconds(1), new Context(key1, value1));\n System.out.printf(\"Creating the sub directory 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-directory"
returns:
description: "A response containing the subdirectory client and the status of creating the directory."
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.ShareDirectoryClient?alt=com.azure.storage.file.share.ShareDirectoryClient&text=ShareDirectoryClient\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.storage.file.share.ShareDirectoryClient.createWithResponse(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.ShareDirectoryClient.createWithResponse(FileSmbProperties smbProperties, String filePermission, Map<String,String> metadata, Duration timeout, Context context)"
name: "createWithResponse(FileSmbProperties smbProperties, String filePermission, Map<String,String> metadata, Duration timeout, Context context)"
nameWithType: "ShareDirectoryClient.createWithResponse(FileSmbProperties smbProperties, String filePermission, Map<String,String> metadata, Duration timeout, Context context)"
summary: "Creates a directory in the file share and returns a response of Share<wbr>Directory<wbr>Info to interact with it."
parameters:
- description: "The SMB properties of the directory."
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 directory."
name: "filePermission"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "Optional metadata to associate with the directory."
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<ShareDirectoryInfo> createWithResponse(FileSmbProperties smbProperties, String filePermission, Map<String,String> metadata, Duration timeout, Context context)"
desc: "Creates a directory in the file share and returns a response of ShareDirectoryInfo to interact with it.\n\n**Code Samples**\n\nCreate the directory\n\n```java\nFileSmbProperties smbProperties = new FileSmbProperties();\n String filePermission = \"filePermission\";\n Response<ShareDirectoryInfo> response = shareDirectoryClient.createWithResponse(smbProperties, filePermission,\n Collections.singletonMap(\"directory\", \"metadata\"), Duration.ofSeconds(1), new Context(key1, value1));\n System.out.println(\"Completed creating the directory 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/create-directory"
returns:
description: "A response containing the directory info and the status of creating the directory."
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.ShareDirectoryInfo?alt=com.azure.storage.file.share.models.ShareDirectoryInfo&text=ShareDirectoryInfo\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.storage.file.share.ShareDirectoryClient.createWithResponse(com.azure.storage.file.share.options.ShareDirectoryCreateOptions,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareDirectoryClient.createWithResponse(ShareDirectoryCreateOptions options, Duration timeout, Context context)"
name: "createWithResponse(ShareDirectoryCreateOptions options, Duration timeout, Context context)"
nameWithType: "ShareDirectoryClient.createWithResponse(ShareDirectoryCreateOptions options, Duration timeout, Context context)"
summary: "Creates a directory in the file share and returns a response of Share<wbr>Directory<wbr>Info to interact with it."
parameters:
- description: "<xref uid=\"com.azure.storage.file.share.options.ShareDirectoryCreateOptions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareDirectoryCreateOptions\"></xref>"
name: "options"
type: "<xref href=\"com.azure.storage.file.share.options.ShareDirectoryCreateOptions?alt=com.azure.storage.file.share.options.ShareDirectoryCreateOptions&text=ShareDirectoryCreateOptions\" 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<ShareDirectoryInfo> createWithResponse(ShareDirectoryCreateOptions options, Duration timeout, Context context)"
desc: "Creates a directory in the file share and returns a response of ShareDirectoryInfo to interact with it.\n\n**Code Samples**\n\nCreate the directory\n\n```java\nFileSmbProperties smbProperties = new FileSmbProperties();\n String filePermission = \"filePermission\";\n ShareDirectoryCreateOptions options = new ShareDirectoryCreateOptions().setSmbProperties(smbProperties)\n .setFilePermission(filePermission).setMetadata(Collections.singletonMap(\"directory\", \"metadata\"));\n Response<ShareDirectoryInfo> response = shareDirectoryClient.createWithResponse(options, Duration.ofSeconds(1),\n new Context(key1, value1));\n System.out.println(\"Completed creating the directory 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/create-directory"
returns:
description: "A response containing the directory info and the status of creating the directory."
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.ShareDirectoryInfo?alt=com.azure.storage.file.share.models.ShareDirectoryInfo&text=ShareDirectoryInfo\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.storage.file.share.ShareDirectoryClient.delete()"
fullName: "com.azure.storage.file.share.ShareDirectoryClient.delete()"
name: "delete()"
nameWithType: "ShareDirectoryClient.delete()"
summary: "Deletes the directory in the file share."
syntax: "public void delete()"
desc: "Deletes the directory in the file share. The directory must be empty before it can be deleted.\n\n**Code Samples**\n\nDelete the directory\n\n```java\nshareDirectoryClient.delete();\n System.out.println(\"Completed 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-directory"
- uid: "com.azure.storage.file.share.ShareDirectoryClient.deleteFile(java.lang.String)"
fullName: "com.azure.storage.file.share.ShareDirectoryClient.deleteFile(String fileName)"
name: "deleteFile(String fileName)"
nameWithType: "ShareDirectoryClient.deleteFile(String fileName)"
summary: "Deletes the file with specific name in this directory."
parameters:
- description: "Name of the file"
name: "fileName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public void deleteFile(String fileName)"
desc: "Deletes the file with specific name in this directory.\n\n**Code Samples**\n\nDelete the file \"filetest\"\n\n```java\nshareDirectoryClient.deleteFile(\"myfile\");\n System.out.println(\"Completed 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.ShareDirectoryClient.deleteFileIfExists(java.lang.String)"
fullName: "com.azure.storage.file.share.ShareDirectoryClient.deleteFileIfExists(String fileName)"
name: "deleteFileIfExists(String fileName)"
nameWithType: "ShareDirectoryClient.deleteFileIfExists(String fileName)"
summary: "Deletes the file with specific name in this directory if it exists."
parameters:
- description: "Name of the file"
name: "fileName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public boolean deleteFileIfExists(String fileName)"
desc: "Deletes the file with specific name in this directory if it exists.\n\n**Code Samples**\n\nDelete the file \"filetest\"\n\n```java\nboolean result = shareDirectoryClient.deleteFileIfExists(\"myfile\");\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.ShareDirectoryClient.deleteFileIfExistsWithResponse(java.lang.String,com.azure.storage.file.share.models.ShareRequestConditions,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareDirectoryClient.deleteFileIfExistsWithResponse(String fileName, ShareRequestConditions requestConditions, Duration timeout, Context context)"
name: "deleteFileIfExistsWithResponse(String fileName, ShareRequestConditions requestConditions, Duration timeout, Context context)"
nameWithType: "ShareDirectoryClient.deleteFileIfExistsWithResponse(String fileName, ShareRequestConditions requestConditions, Duration timeout, Context context)"
summary: "Deletes the file with specific name in this directory if it exists."
parameters:
- description: "Name of the file"
name: "fileName"
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<Boolean> deleteFileIfExistsWithResponse(String fileName, ShareRequestConditions requestConditions, Duration timeout, Context context)"
desc: "Deletes the file with specific name in this directory if it exists.\n\n**Code Samples**\n\nDelete the file \"filetest\"\n\n```java\nShareRequestConditions requestConditions = new ShareRequestConditions().setLeaseId(leaseId);\n\n Response<Boolean> fileResponse = shareDirectoryClient.deleteFileIfExistsWithResponse(\"myfile\", requestConditions,\n Duration.ofSeconds(1), new Context(key1, value1));\n if (fileResponse.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.ShareDirectoryClient.deleteFileIfExistsWithResponse(java.lang.String,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareDirectoryClient.deleteFileIfExistsWithResponse(String fileName, Duration timeout, Context context)"
name: "deleteFileIfExistsWithResponse(String fileName, Duration timeout, Context context)"
nameWithType: "ShareDirectoryClient.deleteFileIfExistsWithResponse(String fileName, Duration timeout, Context context)"
summary: "Deletes the file with specific name in this directory if it exists."
parameters:
- description: "Name of the file"
name: "fileName"
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<Boolean> deleteFileIfExistsWithResponse(String fileName, Duration timeout, Context context)"
desc: "Deletes the file with specific name in this directory if it exists.\n\n**Code Samples**\n\nDelete the file \"filetest\"\n\n```java\nResponse<Boolean> response = shareDirectoryClient.deleteFileIfExistsWithResponse(\"myfile\",\n Duration.ofSeconds(1), 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.ShareDirectoryClient.deleteFileWithResponse(java.lang.String,com.azure.storage.file.share.models.ShareRequestConditions,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareDirectoryClient.deleteFileWithResponse(String fileName, ShareRequestConditions requestConditions, Duration timeout, Context context)"
name: "deleteFileWithResponse(String fileName, ShareRequestConditions requestConditions, Duration timeout, Context context)"
nameWithType: "ShareDirectoryClient.deleteFileWithResponse(String fileName, ShareRequestConditions requestConditions, Duration timeout, Context context)"
summary: "Deletes the file with specific name in this directory."
parameters:
- description: "Name of the file"
name: "fileName"
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> deleteFileWithResponse(String fileName, ShareRequestConditions requestConditions, Duration timeout, Context context)"
desc: "Deletes the file with specific name in this directory.\n\n**Code Samples**\n\nDelete the file \"filetest\"\n\n```java\nShareRequestConditions requestConditions = new ShareRequestConditions().setLeaseId(leaseId);\n Response<Void> response = shareDirectoryClient.deleteFileWithResponse(\"myfile\", requestConditions,\n Duration.ofSeconds(1), new Context(key1, value1));\n System.out.println(\"Completed 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.ShareDirectoryClient.deleteFileWithResponse(java.lang.String,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareDirectoryClient.deleteFileWithResponse(String fileName, Duration timeout, Context context)"
name: "deleteFileWithResponse(String fileName, Duration timeout, Context context)"
nameWithType: "ShareDirectoryClient.deleteFileWithResponse(String fileName, Duration timeout, Context context)"
summary: "Deletes the file with specific name in this directory."
parameters:
- description: "Name of the file"
name: "fileName"
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> deleteFileWithResponse(String fileName, Duration timeout, Context context)"
desc: "Deletes the file with specific name in this directory.\n\n**Code Samples**\n\nDelete the file \"filetest\"\n\n```java\nResponse<Void> response = shareDirectoryClient.deleteFileWithResponse(\"myfile\",\n Duration.ofSeconds(1), new Context(key1, value1));\n System.out.println(\"Completed 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.ShareDirectoryClient.deleteIfExists()"
fullName: "com.azure.storage.file.share.ShareDirectoryClient.deleteIfExists()"
name: "deleteIfExists()"
nameWithType: "ShareDirectoryClient.deleteIfExists()"
summary: "Deletes the directory in the file share if it exists."
syntax: "public boolean deleteIfExists()"
desc: "Deletes the directory in the file share if it exists. The directory must be empty before it can be deleted.\n\n**Code Samples**\n\nDelete the directory\n\n```java\nShareDirectoryClient shareDirectoryClient = createClientWithSASToken();\n boolean result = shareDirectoryClient.deleteIfExists();\n System.out.println(\"Directory deleted: \" + result);\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/delete-directory"
returns:
description: "<code>true</code> if the directory is successfully deleted, <code>false</code> if the directory does not exist."
type: "<xref href=\"boolean?alt=boolean&text=boolean\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.storage.file.share.ShareDirectoryClient.deleteIfExistsWithResponse(java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareDirectoryClient.deleteIfExistsWithResponse(Duration timeout, Context context)"
name: "deleteIfExistsWithResponse(Duration timeout, Context context)"
nameWithType: "ShareDirectoryClient.deleteIfExistsWithResponse(Duration timeout, Context context)"
summary: "Deletes the directory in the file share if it exists."
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<Boolean> deleteIfExistsWithResponse(Duration timeout, Context context)"
desc: "Deletes the directory in the file share if it exists. The directory must be empty before it can be deleted.\n\n**Code Samples**\n\nDelete the directory\n\n```java\nResponse<Boolean> response = shareDirectoryClient.deleteIfExistsWithResponse(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-directory"
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 directory\n was successfully deleted. If status code is 404, the directory 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.ShareDirectoryClient.deleteSubdirectory(java.lang.String)"
fullName: "com.azure.storage.file.share.ShareDirectoryClient.deleteSubdirectory(String subdirectoryName)"
name: "deleteSubdirectory(String subdirectoryName)"
nameWithType: "ShareDirectoryClient.deleteSubdirectory(String subdirectoryName)"
summary: "Deletes the subdirectory with specific name in this directory."
parameters:
- description: "Name of the subdirectory"
name: "subdirectoryName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public void deleteSubdirectory(String subdirectoryName)"
desc: "Deletes the subdirectory with specific name in this directory. The directory must be empty before it can be deleted.\n\n**Code Samples**\n\nDelete the subdirectory named \"subdir\"\n\n```java\nshareDirectoryClient.deleteSubdirectory(\"mysubdirectory\");\n System.out.println(\"Complete deleting the subdirectory.\");\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/delete-directory"
- uid: "com.azure.storage.file.share.ShareDirectoryClient.deleteSubdirectoryIfExists(java.lang.String)"
fullName: "com.azure.storage.file.share.ShareDirectoryClient.deleteSubdirectoryIfExists(String subdirectoryName)"
name: "deleteSubdirectoryIfExists(String subdirectoryName)"
nameWithType: "ShareDirectoryClient.deleteSubdirectoryIfExists(String subdirectoryName)"
summary: "Deletes the subdirectory with specific name in this directory if it exists."
parameters:
- description: "Name of the subdirectory"
name: "subdirectoryName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public boolean deleteSubdirectoryIfExists(String subdirectoryName)"
desc: "Deletes the subdirectory with specific name in this directory if it exists. The directory must be empty before it can be deleted.\n\n**Code Samples**\n\nDelete the subdirectory named \"subdir\"\n\n```java\nboolean result = shareDirectoryClient.deleteSubdirectoryIfExists(\"mysubdirectory\");\n System.out.println(\"Subdirectory deleted: \" + result);\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/delete-directory"
returns:
description: "<code>true</code> if subdirectory is successfully deleted, <code>false</code> if subdirectory does not exist."
type: "<xref href=\"boolean?alt=boolean&text=boolean\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.storage.file.share.ShareDirectoryClient.deleteSubdirectoryIfExistsWithResponse(java.lang.String,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareDirectoryClient.deleteSubdirectoryIfExistsWithResponse(String subdirectoryName, Duration timeout, Context context)"
name: "deleteSubdirectoryIfExistsWithResponse(String subdirectoryName, Duration timeout, Context context)"
nameWithType: "ShareDirectoryClient.deleteSubdirectoryIfExistsWithResponse(String subdirectoryName, Duration timeout, Context context)"
summary: "Deletes the subdirectory with specific name in this directory if it exists."
parameters:
- description: "Name of the subdirectory"
name: "subdirectoryName"
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<Boolean> deleteSubdirectoryIfExistsWithResponse(String subdirectoryName, Duration timeout, Context context)"
desc: "Deletes the subdirectory with specific name in this directory if it exists. The directory must be empty before it can be deleted.\n\n**Code Samples**\n\nDelete the subdirectory named \"mysubdirectory\"\n\n```java\nResponse<Boolean> response = shareDirectoryClient.deleteSubdirectoryIfExistsWithResponse(\"mysubdirectory\",\n Duration.ofSeconds(1), 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-directory"
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\n subdirectory was successfully deleted. If status code is 404, the subdirectory 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.ShareDirectoryClient.deleteSubdirectoryWithResponse(java.lang.String,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareDirectoryClient.deleteSubdirectoryWithResponse(String subdirectoryName, Duration timeout, Context context)"
name: "deleteSubdirectoryWithResponse(String subdirectoryName, Duration timeout, Context context)"
nameWithType: "ShareDirectoryClient.deleteSubdirectoryWithResponse(String subdirectoryName, Duration timeout, Context context)"
summary: "Deletes the subdirectory with specific name in this directory."
parameters:
- description: "Name of the subdirectory"
name: "subdirectoryName"
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> deleteSubdirectoryWithResponse(String subdirectoryName, Duration timeout, Context context)"
desc: "Deletes the subdirectory with specific name in this directory. The directory must be empty before it can be deleted.\n\n**Code Samples**\n\nDelete the subdirectory named \"subdir\"\n\n```java\nResponse<Void> response = shareDirectoryClient.deleteSubdirectoryWithResponse(\"mysubdirectory\",\n Duration.ofSeconds(1), new Context(key1, value1));\n System.out.println(\"Completed deleting the subdirectory 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-directory"
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.ShareDirectoryClient.deleteWithResponse(java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareDirectoryClient.deleteWithResponse(Duration timeout, Context context)"
name: "deleteWithResponse(Duration timeout, Context context)"
nameWithType: "ShareDirectoryClient.deleteWithResponse(Duration timeout, Context context)"
summary: "Deletes the directory in the file share."
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 directory in the file share. The directory must be empty before it can be deleted.\n\n**Code Samples**\n\nDelete the directory\n\n```java\nResponse<Void> response = shareDirectoryClient.deleteWithResponse(Duration.ofSeconds(1), new Context(key1, value1));\n System.out.println(\"Completed 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-directory"
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.ShareDirectoryClient.exists()"
fullName: "com.azure.storage.file.share.ShareDirectoryClient.exists()"
name: "exists()"
nameWithType: "ShareDirectoryClient.exists()"
summary: "Determines if the directory this client represents exists in the cloud."
syntax: "public Boolean exists()"
desc: "Determines if the directory 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 directory."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Boolean.html\">Boolean</a>"
- uid: "com.azure.storage.file.share.ShareDirectoryClient.existsWithResponse(java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareDirectoryClient.existsWithResponse(Duration timeout, Context context)"
name: "existsWithResponse(Duration timeout, Context context)"
nameWithType: "ShareDirectoryClient.existsWithResponse(Duration timeout, Context context)"
summary: "Determines if the directory 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 directory 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 directory."
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.ShareDirectoryClient.forceCloseAllHandles(boolean,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareDirectoryClient.forceCloseAllHandles(boolean recursive, Duration timeout, Context context)"
name: "forceCloseAllHandles(boolean recursive, Duration timeout, Context context)"
nameWithType: "ShareDirectoryClient.forceCloseAllHandles(boolean recursive, Duration timeout, Context context)"
summary: "Closes all handles opened on the directory at the service."
parameters:
- description: "Flag indicating if the operation should apply to all subdirectories and files contained in the\n directory."
name: "recursive"
type: "<xref href=\"boolean?alt=boolean&text=boolean\" 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 CloseHandlesInfo forceCloseAllHandles(boolean recursive, Duration timeout, Context context)"
desc: "Closes all handles opened on the directory at the service.\n\n**Code Samples**\n\nForce close all handles recursively.\n\n```java\nCloseHandlesInfo closeHandlesInfo = shareDirectoryClient.forceCloseAllHandles(true, Duration.ofSeconds(30),\n Context.NONE);\n System.out.printf(\"Closed %d open handles on the directory%n\", closeHandlesInfo.getClosedHandles());\n System.out.printf(\"Failed to close %d open handles on the directory%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.ShareDirectoryClient.forceCloseHandle(java.lang.String)"
fullName: "com.azure.storage.file.share.ShareDirectoryClient.forceCloseHandle(String handleId)"
name: "forceCloseHandle(String handleId)"
nameWithType: "ShareDirectoryClient.forceCloseHandle(String handleId)"
summary: "Closes a handle on the directory 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 directory at the service. This is intended to be used alongside <xref uid=\"com.azure.storage.file.share.ShareDirectoryClient.listHandles(java.lang.Integer,boolean,java.time.Duration,com.azure.core.util.Context)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#listHandles(Integer, boolean, Duration, Context)\"></xref>.\n\n**Code Samples**\n\nForce close handles returned by list handles.\n\n```java\nshareDirectoryClient.listHandles(null, true, Duration.ofSeconds(30), Context.NONE).forEach(handleItem -> {\n shareDirectoryClient.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.ShareDirectoryClient.forceCloseHandleWithResponse(java.lang.String,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareDirectoryClient.forceCloseHandleWithResponse(String handleId, Duration timeout, Context context)"
name: "forceCloseHandleWithResponse(String handleId, Duration timeout, Context context)"
nameWithType: "ShareDirectoryClient.forceCloseHandleWithResponse(String handleId, Duration timeout, Context context)"
summary: "Closes a handle on the directory at the service."
parameters:
- description: "Handle ID to be clsoed."
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 directory at the service. This is intended to be used alongside <xref uid=\"com.azure.storage.file.share.ShareDirectoryClient.listHandles(java.lang.Integer,boolean,java.time.Duration,com.azure.core.util.Context)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#listHandles(Integer, boolean, Duration, Context)\"></xref>.\n\n**Code Samples**\n\nForce close handles returned by list handles.\n\n```java\nshareDirectoryClient.listHandles(null, true, Duration.ofSeconds(30), Context.NONE).forEach(handleItem -> {\n Response<CloseHandlesInfo> closeResponse = shareDirectoryClient.forceCloseHandleWithResponse(\n 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.ShareDirectoryClient.generateSas(com.azure.storage.file.share.sas.ShareServiceSasSignatureValues)"
fullName: "com.azure.storage.file.share.ShareDirectoryClient.generateSas(ShareServiceSasSignatureValues shareServiceSasSignatureValues)"
name: "generateSas(ShareServiceSasSignatureValues shareServiceSasSignatureValues)"
nameWithType: "ShareDirectoryClient.generateSas(ShareServiceSasSignatureValues shareServiceSasSignatureValues)"
summary: "Generates a service SAS for the directory 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 directory 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 shareDirectoryClient.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.ShareDirectoryClient.generateSas(com.azure.storage.file.share.sas.ShareServiceSasSignatureValues,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareDirectoryClient.generateSas(ShareServiceSasSignatureValues shareServiceSasSignatureValues, Context context)"
name: "generateSas(ShareServiceSasSignatureValues shareServiceSasSignatureValues, Context context)"
nameWithType: "ShareDirectoryClient.generateSas(ShareServiceSasSignatureValues shareServiceSasSignatureValues, Context context)"
summary: "Generates a service SAS for the directory 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 directory 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 shareDirectoryClient.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.ShareDirectoryClient.getAccountName()"
fullName: "com.azure.storage.file.share.ShareDirectoryClient.getAccountName()"
name: "getAccountName()"
nameWithType: "ShareDirectoryClient.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.ShareDirectoryClient.getDirectoryPath()"
fullName: "com.azure.storage.file.share.ShareDirectoryClient.getDirectoryPath()"
name: "getDirectoryPath()"
nameWithType: "ShareDirectoryClient.getDirectoryPath()"
summary: "Get the directory path of the client."
syntax: "public String getDirectoryPath()"
desc: "Get the directory path of the client.\n\nGet directory path.\n\n```java\nString directoryPath = shareDirectoryClient.getDirectoryPath();\n System.out.println(\"The name of the directory is \" + directoryPath);\n```"
returns:
description: "The path of the directory."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- uid: "com.azure.storage.file.share.ShareDirectoryClient.getDirectoryUrl()"
fullName: "com.azure.storage.file.share.ShareDirectoryClient.getDirectoryUrl()"
name: "getDirectoryUrl()"
nameWithType: "ShareDirectoryClient.getDirectoryUrl()"
summary: "Get the url of the storage directory client."
syntax: "public String getDirectoryUrl()"
desc: "Get the url of the storage directory client."
returns:
description: "the URL of the storage directory client."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- uid: "com.azure.storage.file.share.ShareDirectoryClient.getFileClient(java.lang.String)"
fullName: "com.azure.storage.file.share.ShareDirectoryClient.getFileClient(String fileName)"
name: "getFileClient(String fileName)"
nameWithType: "ShareDirectoryClient.getFileClient(String fileName)"
summary: "Constructs a Share<wbr>File<wbr>Client that interacts with the specified file."
parameters:
- description: "Name of the file"
name: "fileName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public ShareFileClient getFileClient(String fileName)"
desc: "Constructs a ShareFileClient that interacts with the specified file.\n\nIf the file doesn't exist in this directory <xref uid=\"com.azure.storage.file.share.ShareFileClient.create(long)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareFileClient#create(long)\"></xref> create\\} in the client will need to be called before interaction with the file can happen."
returns:
description: "a ShareFileClient that interacts with the specified share"
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.ShareDirectoryClient.getHttpPipeline()"
fullName: "com.azure.storage.file.share.ShareDirectoryClient.getHttpPipeline()"
name: "getHttpPipeline()"
nameWithType: "ShareDirectoryClient.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.ShareDirectoryClient.getProperties()"
fullName: "com.azure.storage.file.share.ShareDirectoryClient.getProperties()"
name: "getProperties()"
nameWithType: "ShareDirectoryClient.getProperties()"
summary: "Retrieves the properties of this directory."
syntax: "public ShareDirectoryProperties getProperties()"
desc: "Retrieves the properties of this directory. The properties includes directory metadata, last modified date, is server encrypted, and eTag.\n\n**Code Samples**\n\nRetrieve directory properties\n\n```java\nShareDirectoryProperties response = shareDirectoryClient.getProperties();\n System.out.printf(\"Directory latest modified date is %s.\", response.getLastModified());\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/get-directory-properties"
returns:
description: "Storage directory properties"
type: "<xref href=\"com.azure.storage.file.share.models.ShareDirectoryProperties?alt=com.azure.storage.file.share.models.ShareDirectoryProperties&text=ShareDirectoryProperties\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.storage.file.share.ShareDirectoryClient.getPropertiesWithResponse(java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareDirectoryClient.getPropertiesWithResponse(Duration timeout, Context context)"
name: "getPropertiesWithResponse(Duration timeout, Context context)"
nameWithType: "ShareDirectoryClient.getPropertiesWithResponse(Duration timeout, Context context)"
summary: "Retrieves the properties of this directory."
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<ShareDirectoryProperties> getPropertiesWithResponse(Duration timeout, Context context)"
desc: "Retrieves the properties of this directory. The properties includes directory metadata, last modified date, is server encrypted, and eTag.\n\n**Code Samples**\n\nRetrieve directory properties\n\n```java\nResponse<ShareDirectoryProperties> response = shareDirectoryClient.getPropertiesWithResponse(\n Duration.ofSeconds(1), new Context(key1, value1));\n System.out.printf(\"Directory 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-directory-properties"
returns:
description: "A response containing the storage directory properties with response status code and headers"
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.ShareDirectoryProperties?alt=com.azure.storage.file.share.models.ShareDirectoryProperties&text=ShareDirectoryProperties\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.storage.file.share.ShareDirectoryClient.getServiceVersion()"
fullName: "com.azure.storage.file.share.ShareDirectoryClient.getServiceVersion()"
name: "getServiceVersion()"
nameWithType: "ShareDirectoryClient.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.ShareDirectoryClient.getShareName()"
fullName: "com.azure.storage.file.share.ShareDirectoryClient.getShareName()"
name: "getShareName()"
nameWithType: "ShareDirectoryClient.getShareName()"
summary: "Get the share name of directory client."
syntax: "public String getShareName()"
desc: "Get the share name of directory client.\n\nGet the share name.\n\n```java\nString shareName = directoryAsyncClient.getShareName();\n System.out.println(\"The share name of the directory is \" + shareName);\n```"
returns:
description: "The share name of the directory."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- uid: "com.azure.storage.file.share.ShareDirectoryClient.getShareSnapshotId()"
fullName: "com.azure.storage.file.share.ShareDirectoryClient.getShareSnapshotId()"
name: "getShareSnapshotId()"
nameWithType: "ShareDirectoryClient.getShareSnapshotId()"
summary: "Get snapshot id which attached to <xref uid=\"com.azure.storage.file.share.ShareDirectoryClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareDirectoryClient\"></xref>."
syntax: "public String getShareSnapshotId()"
desc: "Get snapshot id which attached to <xref uid=\"com.azure.storage.file.share.ShareDirectoryClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareDirectoryClient\"></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 ShareDirectoryClient shareDirectoryClient = new ShareFileClientBuilder()\n .endpoint(\"https://${accountName}.file.core.windows.net\")\n .sasToken(\"${SASToken}\")\n .shareName(\"myshare\")\n .resourcePath(\"mydirectory\")\n .snapshot(currentTime.toString())\n .buildDirectoryClient();\n\n System.out.printf(\"Snapshot ID: %s%n\", shareDirectoryClient.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.ShareDirectoryClient.getSubdirectoryClient(java.lang.String)"
fullName: "com.azure.storage.file.share.ShareDirectoryClient.getSubdirectoryClient(String subdirectoryName)"
name: "getSubdirectoryClient(String subdirectoryName)"
nameWithType: "ShareDirectoryClient.getSubdirectoryClient(String subdirectoryName)"
summary: "Constructs a Share<wbr>Directory<wbr>Client that interacts with the specified directory."
parameters:
- description: "Name of the directory"
name: "subdirectoryName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public ShareDirectoryClient getSubdirectoryClient(String subdirectoryName)"
desc: "Constructs a ShareDirectoryClient that interacts with the specified directory.\n\nIf the file doesn't exist in this directory <xref uid=\"com.azure.storage.file.share.ShareDirectoryClient.create()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareDirectoryClient#create()\"></xref> create\\} in the client will need to be called before interaction with the directory can happen."
returns:
description: "a ShareDirectoryClient that interacts with the specified directory"
type: "<xref href=\"com.azure.storage.file.share.ShareDirectoryClient?alt=com.azure.storage.file.share.ShareDirectoryClient&text=ShareDirectoryClient\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.storage.file.share.ShareDirectoryClient.listFilesAndDirectories()"
fullName: "com.azure.storage.file.share.ShareDirectoryClient.listFilesAndDirectories()"
name: "listFilesAndDirectories()"
nameWithType: "ShareDirectoryClient.listFilesAndDirectories()"
summary: "Lists all sub-directories and files in this directory without their prefix or max<wbr>Result in single page."
syntax: "public PagedIterable<ShareFileItem> listFilesAndDirectories()"
desc: "Lists all sub-directories and files in this directory without their prefix or maxResult in single page.\n\n**Code Samples**\n\nList all sub-directories and files in the account\n\n```java\nshareDirectoryClient.listFilesAndDirectories().forEach(\n fileRef -> System.out.printf(\"Is the resource a directory? %b. The resource name is: %s.\",\n fileRef.isDirectory(), fileRef.getName())\n );\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/list-directories-and-files"
returns:
description: "<xref uid=\"com.azure.storage.file.share.models.ShareFileItem\" data-throw-if-not-resolved=\"false\" data-raw-source=\"File info\"></xref> in the storage directory"
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.ShareFileItem?alt=com.azure.storage.file.share.models.ShareFileItem&text=ShareFileItem\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.storage.file.share.ShareDirectoryClient.listFilesAndDirectories(com.azure.storage.file.share.options.ShareListFilesAndDirectoriesOptions,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareDirectoryClient.listFilesAndDirectories(ShareListFilesAndDirectoriesOptions options, Duration timeout, Context context)"
name: "listFilesAndDirectories(ShareListFilesAndDirectoriesOptions options, Duration timeout, Context context)"
nameWithType: "ShareDirectoryClient.listFilesAndDirectories(ShareListFilesAndDirectoriesOptions options, Duration timeout, Context context)"
summary: "Lists all sub-directories and files in this directory with their prefix or snapshots."
parameters:
- description: "Optional parameters."
name: "options"
type: "<xref href=\"com.azure.storage.file.share.options.ShareListFilesAndDirectoriesOptions?alt=com.azure.storage.file.share.options.ShareListFilesAndDirectoriesOptions&text=ShareListFilesAndDirectoriesOptions\" 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<ShareFileItem> listFilesAndDirectories(ShareListFilesAndDirectoriesOptions options, Duration timeout, Context context)"
desc: "Lists all sub-directories and files in this directory with their prefix or snapshots.\n\n**Code Samples**\n\nList all sub-directories and files in this directory with \"subdir\" prefix and return 10 results in the account\n\n```java\nshareDirectoryClient.listFilesAndDirectories(new ShareListFilesAndDirectoriesOptions()\n .setPrefix(\"subdir\").setMaxResultsPerPage(10), Duration.ofSeconds(1), new Context(key1, value1))\n .forEach(fileRef -> System.out.printf(\"Is the resource a directory? %b. The resource name is: %s.\",\n fileRef.isDirectory(), fileRef.getName()));\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/list-directories-and-files"
returns:
description: "<xref uid=\"com.azure.storage.file.share.models.ShareFileItem\" data-throw-if-not-resolved=\"false\" data-raw-source=\"File info\"></xref> in this directory with prefix and max number of return results."
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.ShareFileItem?alt=com.azure.storage.file.share.models.ShareFileItem&text=ShareFileItem\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.storage.file.share.ShareDirectoryClient.listFilesAndDirectories(java.lang.String,java.lang.Integer,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareDirectoryClient.listFilesAndDirectories(String prefix, Integer maxResultsPerPage, Duration timeout, Context context)"
name: "listFilesAndDirectories(String prefix, Integer maxResultsPerPage, Duration timeout, Context context)"
nameWithType: "ShareDirectoryClient.listFilesAndDirectories(String prefix, Integer maxResultsPerPage, Duration timeout, Context context)"
summary: "Lists all sub-directories and files in this directory with their prefix or snapshots."
parameters:
- description: "Optional prefix which filters the results to return only files and directories whose name begins\n with."
name: "prefix"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "Optional maximum number of files and/or directories to return per page.\n If the request does not specify maxResultsPerPage or specifies a value greater than 5,000,\n the server will return up to 5,000 items. If iterating by page, the page size passed to byPage methods such as\n <xref uid=\"com.azure.core.http.rest.PagedIterable.iterableByPage*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"PagedIterable#iterableByPage(int)\"></xref> will be preferred over this value."
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<ShareFileItem> listFilesAndDirectories(String prefix, Integer maxResultsPerPage, Duration timeout, Context context)"
desc: "Lists all sub-directories and files in this directory with their prefix or snapshots.\n\n**Code Samples**\n\nList all sub-directories and files in this directory with \"subdir\" prefix and return 10 results in the account\n\n```java\nshareDirectoryClient.listFilesAndDirectories(\"subdir\", 10, Duration.ofSeconds(1),\n new Context(key1, value1)).forEach(\n fileRef -> System.out.printf(\"Is the resource a directory? %b. The resource name is: %s.\",\n fileRef.isDirectory(), fileRef.getName())\n );\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/list-directories-and-files"
returns:
description: "<xref uid=\"com.azure.storage.file.share.models.ShareFileItem\" data-throw-if-not-resolved=\"false\" data-raw-source=\"File info\"></xref> in this directory with prefix and max number of return results."
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.ShareFileItem?alt=com.azure.storage.file.share.models.ShareFileItem&text=ShareFileItem\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.storage.file.share.ShareDirectoryClient.listHandles(java.lang.Integer,boolean,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareDirectoryClient.listHandles(Integer maxResultsPerPage, boolean recursive, Duration timeout, Context context)"
name: "listHandles(Integer maxResultsPerPage, boolean recursive, Duration timeout, Context context)"
nameWithType: "ShareDirectoryClient.listHandles(Integer maxResultsPerPage, boolean recursive, Duration timeout, Context context)"
summary: "List of open handles on a directory or a file."
parameters:
- description: "Optional maximum number of results will return per page"
name: "maxResultsPerPage"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html\">Integer</a>"
- description: "Specifies operation should apply to the directory specified in the URI, its files, its\n subdirectories and their files."
name: "recursive"
type: "<xref href=\"boolean?alt=boolean&text=boolean\" 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<HandleItem> listHandles(Integer maxResultsPerPage, boolean recursive, Duration timeout, Context context)"
desc: "List of open handles on a directory or a file.\n\n**Code Samples**\n\nGet 10 handles with recursive call.\n\n```java\nIterable<HandleItem> result = shareDirectoryClient.listHandles(10, true, Duration.ofSeconds(1),\n new Context(key1, value1));\n System.out.printf(\"Get handles completed with handle id %s\", result.iterator().next().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 directory 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.ShareDirectoryClient.rename(java.lang.String)"
fullName: "com.azure.storage.file.share.ShareDirectoryClient.rename(String destinationPath)"
name: "rename(String destinationPath)"
nameWithType: "ShareDirectoryClient.rename(String destinationPath)"
summary: "Moves the directory to another location within the share."
parameters:
- description: "Relative path from the share to rename the directory to."
name: "destinationPath"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public ShareDirectoryClient rename(String destinationPath)"
desc: "Moves the directory to another location within the share. For more information see the [Azure Docs][].\n\n**Code Samples**\n\n```java\nShareDirectoryClient renamedClient = client.rename(destinationPath);\n System.out.println(\"Directory Client has been renamed\");\n```\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/rename-directory"
returns:
description: "A <xref uid=\"com.azure.storage.file.share.ShareDirectoryClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareDirectoryClient\"></xref> used to interact with the new file created."
type: "<xref href=\"com.azure.storage.file.share.ShareDirectoryClient?alt=com.azure.storage.file.share.ShareDirectoryClient&text=ShareDirectoryClient\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.storage.file.share.ShareDirectoryClient.renameWithResponse(com.azure.storage.file.share.options.ShareFileRenameOptions,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareDirectoryClient.renameWithResponse(ShareFileRenameOptions options, Duration timeout, Context context)"
name: "renameWithResponse(ShareFileRenameOptions options, Duration timeout, Context context)"
nameWithType: "ShareDirectoryClient.renameWithResponse(ShareFileRenameOptions options, Duration timeout, Context context)"
summary: "Moves the directory 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<ShareDirectoryClient> renameWithResponse(ShareFileRenameOptions options, Duration timeout, Context context)"
desc: "Moves the directory 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 ShareDirectoryClient newRenamedClient = client.renameWithResponse(options, timeout,\n new Context(key1, value1)).getValue();\n System.out.println(\"Directory Client has been renamed\");\n```\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/rename-directory"
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.ShareDirectoryClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareDirectoryClient\"></xref> used\n to 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.ShareDirectoryClient?alt=com.azure.storage.file.share.ShareDirectoryClient&text=ShareDirectoryClient\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.storage.file.share.ShareDirectoryClient.setMetadata(java.util.Map<java.lang.String,java.lang.String>)"
fullName: "com.azure.storage.file.share.ShareDirectoryClient.setMetadata(Map<String,String> metadata)"
name: "setMetadata(Map<String,String> metadata)"
nameWithType: "ShareDirectoryClient.setMetadata(Map<String,String> metadata)"
summary: "Sets the user-defined metadata to associate to the directory."
parameters:
- description: "Optional metadata to set on the directory, if null is passed the metadata for the directory is\n 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 ShareDirectorySetMetadataInfo setMetadata(Map<String,String> metadata)"
desc: "Sets the user-defined metadata to associate to the directory.\n\nIf `null` is passed for the metadata it will clear the metadata associated to the directory.\n\n**Code Samples**\n\nSet the metadata to \"directory:updatedMetadata\"\n\n```java\nShareDirectorySetMetadataInfo response =\n shareDirectoryClient.setMetadata(Collections.singletonMap(\"directory\", \"updatedMetadata\"));\n System.out.printf(\"Setting the directory metadata completed with updated etag %s\", response.getETag());\n```\n\nClear the metadata of the directory\n\n```java\nShareDirectorySetMetadataInfo response = shareDirectoryClient.setMetadata(null);\n System.out.printf(\"Cleared metadata.\");\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/set-directory-metadata"
returns:
description: "The information about the directory"
type: "<xref href=\"com.azure.storage.file.share.models.ShareDirectorySetMetadataInfo?alt=com.azure.storage.file.share.models.ShareDirectorySetMetadataInfo&text=ShareDirectorySetMetadataInfo\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.storage.file.share.ShareDirectoryClient.setMetadataWithResponse(java.util.Map<java.lang.String,java.lang.String>,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareDirectoryClient.setMetadataWithResponse(Map<String,String> metadata, Duration timeout, Context context)"
name: "setMetadataWithResponse(Map<String,String> metadata, Duration timeout, Context context)"
nameWithType: "ShareDirectoryClient.setMetadataWithResponse(Map<String,String> metadata, Duration timeout, Context context)"
summary: "Sets the user-defined metadata to associate to the directory."
parameters:
- description: "Optional metadata to set on the directory, if null is passed the metadata for the directory is\n 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<ShareDirectorySetMetadataInfo> setMetadataWithResponse(Map<String,String> metadata, Duration timeout, Context context)"
desc: "Sets the user-defined metadata to associate to the directory.\n\nIf `null` is passed for the metadata it will clear the metadata associated to the directory.\n\n**Code Samples**\n\nSet the metadata to \"directory:updatedMetadata\"\n\n```java\nResponse<ShareDirectorySetMetadataInfo> response =\n shareDirectoryClient.setMetadataWithResponse(Collections.singletonMap(\"directory\", \"updatedMetadata\"),\n Duration.ofSeconds(1), new Context(key1, value1));\n System.out.printf(\"Setting the directory metadata completed with updated etag %d\", response.getStatusCode());\n```\n\nClear the metadata of the directory\n\n```java\nResponse<ShareDirectorySetMetadataInfo> response = shareDirectoryClient.setMetadataWithResponse(null,\n Duration.ofSeconds(1), new Context(key1, value1));\n System.out.printf(\"Directory latest modified date is %s.\", response.getStatusCode());\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/set-directory-metadata"
returns:
description: "A response containing the information about the directory 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.ShareDirectorySetMetadataInfo?alt=com.azure.storage.file.share.models.ShareDirectorySetMetadataInfo&text=ShareDirectorySetMetadataInfo\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.storage.file.share.ShareDirectoryClient.setProperties(com.azure.storage.file.share.FileSmbProperties,java.lang.String)"
fullName: "com.azure.storage.file.share.ShareDirectoryClient.setProperties(FileSmbProperties smbProperties, String filePermission)"
name: "setProperties(FileSmbProperties smbProperties, String filePermission)"
nameWithType: "ShareDirectoryClient.setProperties(FileSmbProperties smbProperties, String filePermission)"
summary: "Sets the properties of this directory."
parameters:
- description: "The SMB properties of the directory."
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 directory."
name: "filePermission"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public ShareDirectoryInfo setProperties(FileSmbProperties smbProperties, String filePermission)"
desc: "Sets the properties of this directory. The properties include the file SMB properties and the file permission.\n\n**Code Samples**\n\nSet directory properties\n\n```java\nFileSmbProperties smbProperties = new FileSmbProperties();\n String filePermission = \"filePermission\";\n ShareDirectoryInfo response = shareDirectoryClient.setProperties(smbProperties, filePermission);\n System.out.printf(\"Directory latest modified date is %s.\", response.getLastModified());\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/set-directory-properties"
returns:
description: "The storage directory SMB properties"
type: "<xref href=\"com.azure.storage.file.share.models.ShareDirectoryInfo?alt=com.azure.storage.file.share.models.ShareDirectoryInfo&text=ShareDirectoryInfo\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.storage.file.share.ShareDirectoryClient.setPropertiesWithResponse(com.azure.storage.file.share.FileSmbProperties,java.lang.String,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareDirectoryClient.setPropertiesWithResponse(FileSmbProperties smbProperties, String filePermission, Duration timeout, Context context)"
name: "setPropertiesWithResponse(FileSmbProperties smbProperties, String filePermission, Duration timeout, Context context)"
nameWithType: "ShareDirectoryClient.setPropertiesWithResponse(FileSmbProperties smbProperties, String filePermission, Duration timeout, Context context)"
summary: "Sets the properties of this directory."
parameters:
- description: "The SMB properties of the directory."
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 directory."
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<ShareDirectoryInfo> setPropertiesWithResponse(FileSmbProperties smbProperties, String filePermission, Duration timeout, Context context)"
desc: "Sets the properties of this directory. The properties include the file SMB properties and the file permission.\n\n**Code Samples**\n\nSet directory properties\n\n```java\nFileSmbProperties smbProperties = new FileSmbProperties();\n String filePermission = \"filePermission\";\n Response<ShareDirectoryInfo> response = shareDirectoryClient.setPropertiesWithResponse(smbProperties, filePermission,\n Duration.ofSeconds(1), new Context(key1, value1));\n System.out.printf(\"Directory 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/set-directory-properties"
returns:
description: "A response containing the storage directory smb properties with 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.ShareDirectoryInfo?alt=com.azure.storage.file.share.models.ShareDirectoryInfo&text=ShareDirectoryInfo\" data-throw-if-not-resolved=\"False\" />&gt;"
type: "class"
desc: "This class provides a client that contains all the operations for interacting with directory in Azure Storage File Service. Operations allowed by the client are creating, deleting and listing subdirectory and file, retrieving properties, setting metadata and list or force close handles of the directory or file.\n\n**Instantiating an Synchronous Directory Client**\n\n```java\nShareDirectoryClient client = new ShareFileClientBuilder()\n .connectionString(\"${connectionString}\")\n .endpoint(\"${endpoint}\")\n .buildDirectoryClient();\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.23.1