### 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: - "" inheritedClassMethods: - classRef: "java.lang.Object" methodsRef: - "clone" - "equals" - "finalize" - "getClass" - "hashCode" - "notify" - "notifyAll" - "toString" - "wait" - "wait" - "wait" 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 to interact with it." syntax: "public ShareDirectoryInfo create()" desc: "Creates a directory in the file share and returns a response of 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 ." type: "" - 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 ShareDirectoryInfo to interact with it." parameters: - description: "Name of the file" name: "fileName" type: "String" - description: "Size of the file" name: "maxSize" type: "" 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: "" - 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,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 metadata, ShareRequestConditions requestConditions, Duration timeout, Context context)" name: "createFileWithResponse(String fileName, long maxSize, ShareFileHttpHeaders httpHeaders, FileSmbProperties smbProperties, String filePermission, Map metadata, ShareRequestConditions requestConditions, Duration timeout, Context context)" nameWithType: "ShareDirectoryClient.createFileWithResponse(String fileName, long maxSize, ShareFileHttpHeaders httpHeaders, FileSmbProperties smbProperties, String filePermission, Map metadata, ShareRequestConditions requestConditions, Duration timeout, Context context)" summary: "Creates a file in this directory with specific name and returns a response of ShareDirectoryInfo to interact with it." parameters: - description: "Name of the file" name: "fileName" type: "String" - description: "Max size of the file" name: "maxSize" type: "" - description: "The user settable file http headers." name: "httpHeaders" type: "" - description: "The user settable file smb properties." name: "smbProperties" type: "" - description: "THe file permission of the file." name: "filePermission" type: "String" - description: "Optional name-value pairs associated with the file as metadata." name: "metadata" type: "Map<String,String>" - description: "" name: "requestConditions" type: "" - description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a will be thrown." name: "timeout" type: "Duration" - description: "Additional context that is passed through the Http pipeline during the service call." name: "context" type: "" syntax: "public Response createFileWithResponse(String fileName, long maxSize, ShareFileHttpHeaders httpHeaders, FileSmbProperties smbProperties, String filePermission, Map 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 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: "<>" - 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.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 metadata, Duration timeout, Context context)" name: "createFileWithResponse(String fileName, long maxSize, ShareFileHttpHeaders httpHeaders, FileSmbProperties smbProperties, String filePermission, Map metadata, Duration timeout, Context context)" nameWithType: "ShareDirectoryClient.createFileWithResponse(String fileName, long maxSize, ShareFileHttpHeaders httpHeaders, FileSmbProperties smbProperties, String filePermission, Map metadata, Duration timeout, Context context)" summary: "Creates a file in this directory with specific name and returns a response of ShareDirectoryInfo to interact with it." parameters: - description: "Name of the file" name: "fileName" type: "String" - description: "Max size of the file" name: "maxSize" type: "" - description: "The user settable file http headers." name: "httpHeaders" type: "" - description: "The user settable file smb properties." name: "smbProperties" type: "" - description: "THe file permission of the file." name: "filePermission" type: "String" - description: "Optional name-value pairs associated with the file as metadata." name: "metadata" type: "Map<String,String>" - description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a will be thrown." name: "timeout" type: "Duration" - description: "Additional context that is passed through the Http pipeline during the service call." name: "context" type: "" syntax: "public Response createFileWithResponse(String fileName, long maxSize, ShareFileHttpHeaders httpHeaders, FileSmbProperties smbProperties, String filePermission, Map 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 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: "<>" - 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 that contains information about the created directory." type: "" - 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: "" name: "options" type: "" - description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a will be thrown." name: "timeout" type: "Duration" - description: "Additional context that is passed through the Http pipeline during the service call." name: "context" type: "" syntax: "public Response 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 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 signaling completion, whose contains a\n containing information about the directory. If '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: "<>" - 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 ShareDirectoryClient to interact with it." parameters: - description: "Name of the subdirectory" name: "subdirectoryName" type: "String" 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: "" - 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: "String" 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 used to interact with the subdirectory created." type: "" - 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: "String" - description: "" name: "options" type: "" - description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a will be thrown." name: "timeout" type: "Duration" - description: "Additional context that is passed through the Http pipeline during the service call." name: "context" type: "" syntax: "public Response 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 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 whose contains the used\n to interact with the subdirectory created. If '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: "<>" - uid: "com.azure.storage.file.share.ShareDirectoryClient.createSubdirectoryWithResponse(java.lang.String,com.azure.storage.file.share.FileSmbProperties,java.lang.String,java.util.Map,java.time.Duration,com.azure.core.util.Context)" fullName: "com.azure.storage.file.share.ShareDirectoryClient.createSubdirectoryWithResponse(String subdirectoryName, FileSmbProperties smbProperties, String filePermission, Map metadata, Duration timeout, Context context)" name: "createSubdirectoryWithResponse(String subdirectoryName, FileSmbProperties smbProperties, String filePermission, Map metadata, Duration timeout, Context context)" nameWithType: "ShareDirectoryClient.createSubdirectoryWithResponse(String subdirectoryName, FileSmbProperties smbProperties, String filePermission, Map metadata, Duration timeout, Context context)" summary: "Creates a subdirectory under current directory with specific name , metadata and returns a response of ShareDirectoryClient to interact with it." parameters: - description: "Name of the subdirectory" name: "subdirectoryName" type: "String" - description: "The SMB properties of the directory." name: "smbProperties" type: "" - description: "The file permission of the directory." name: "filePermission" type: "String" - description: "Optional metadata to associate with the subdirectory" name: "metadata" type: "Map<String,String>" - description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a will be thrown." name: "timeout" type: "Duration" - description: "Additional context that is passed through the Http pipeline during the service call." name: "context" type: "" syntax: "public Response createSubdirectoryWithResponse(String subdirectoryName, FileSmbProperties smbProperties, String filePermission, Map 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 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: "<>" - uid: "com.azure.storage.file.share.ShareDirectoryClient.createWithResponse(com.azure.storage.file.share.FileSmbProperties,java.lang.String,java.util.Map,java.time.Duration,com.azure.core.util.Context)" fullName: "com.azure.storage.file.share.ShareDirectoryClient.createWithResponse(FileSmbProperties smbProperties, String filePermission, Map metadata, Duration timeout, Context context)" name: "createWithResponse(FileSmbProperties smbProperties, String filePermission, Map metadata, Duration timeout, Context context)" nameWithType: "ShareDirectoryClient.createWithResponse(FileSmbProperties smbProperties, String filePermission, Map metadata, Duration timeout, Context context)" summary: "Creates a directory in the file share and returns a response of ShareDirectoryInfo to interact with it." parameters: - description: "The SMB properties of the directory." name: "smbProperties" type: "" - description: "The file permission of the directory." name: "filePermission" type: "String" - description: "Optional metadata to associate with the directory." name: "metadata" type: "Map<String,String>" - description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a will be thrown." name: "timeout" type: "Duration" - description: "Additional context that is passed through the Http pipeline during the service call." name: "context" type: "" syntax: "public Response createWithResponse(FileSmbProperties smbProperties, String filePermission, Map 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 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: "<>" - 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 ShareDirectoryInfo to interact with it." parameters: - description: "" name: "options" type: "" - description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a will be thrown." name: "timeout" type: "Duration" - description: "Additional context that is passed through the Http pipeline during the service call." name: "context" type: "" syntax: "public Response 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 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: "<>" - 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: "String" 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: "String" 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: "true if the file is successfully deleted, false if the file does not exist." type: "" - 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: "String" - description: "" name: "requestConditions" type: "" - description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a will be thrown." name: "timeout" type: "Duration" - description: "Additional context that is passed through the Http pipeline during the service call." name: "context" type: "" syntax: "public Response 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 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 's status code is 202, the file\n was successfully deleted. If status code is 404, the file does not exist." type: "<Boolean>" - 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: "String" - description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a will be thrown." name: "timeout" type: "Duration" - description: "Additional context that is passed through the Http pipeline during the service call." name: "context" type: "" syntax: "public Response 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 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 's status code is 202, the file\n was successfully deleted. If status code is 404, the file does not exist." type: "<Boolean>" - 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: "String" - description: "" name: "requestConditions" type: "" - description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a will be thrown." name: "timeout" type: "Duration" - description: "Additional context that is passed through the Http pipeline during the service call." name: "context" type: "" syntax: "public Response 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 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: "<Void>" - 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: "String" - description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a will be thrown." name: "timeout" type: "Duration" - description: "Additional context that is passed through the Http pipeline during the service call." name: "context" type: "" syntax: "public Response 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 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: "<Void>" - 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: "true if the directory is successfully deleted, false if the directory does not exist." type: "" - 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 will be thrown." name: "timeout" type: "Duration" - description: "Additional context that is passed through the Http pipeline during the service call." name: "context" type: "" syntax: "public Response 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 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 's status code is 202, the directory\n was successfully deleted. If status code is 404, the directory does not exist." type: "<Boolean>" - 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: "String" 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: "String" 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: "true if subdirectory is successfully deleted, false if subdirectory does not exist." type: "" - 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: "String" - description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a will be thrown." name: "timeout" type: "Duration" - description: "Additional context that is passed through the Http pipeline during the service call." name: "context" type: "" syntax: "public Response 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 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 's status code is 202, the\n subdirectory was successfully deleted. If status code is 404, the subdirectory does not exist." type: "<Boolean>" - 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: "String" - description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a will be thrown." name: "timeout" type: "Duration" - description: "Additional context that is passed through the Http pipeline during the service call." name: "context" type: "" syntax: "public Response 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 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: "<Void>" - 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 will be thrown." name: "timeout" type: "Duration" - description: "Additional context that is passed through the Http pipeline during the service call." name: "context" type: "" syntax: "public Response 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 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: "<Void>" - 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: "Boolean" - 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 will be raised." name: "timeout" type: "Duration" - description: "Additional context that is passed through the Http pipeline during the service call." name: "context" type: "" syntax: "public Response 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: "<Boolean>" - 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: "" - description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a will be thrown." name: "timeout" type: "Duration" - description: "Additional context that is passed through the Http pipeline during the service call." name: "context" type: "" 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: "" - 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: "String" syntax: "public CloseHandlesInfo forceCloseHandle(String handleId)" desc: "Closes a handle on the directory at the service. This is intended to be used alongside .\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: "" - 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: "String" - description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a will be thrown." name: "timeout" type: "Duration" - description: "Additional context that is passed through the Http pipeline during the service call." name: "context" type: "" syntax: "public Response forceCloseHandleWithResponse(String handleId, Duration timeout, Context context)" desc: "Closes a handle on the directory at the service. This is intended to be used alongside .\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 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: "<>" - 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 " parameters: - description: "" name: "shareServiceSasSignatureValues" type: "" syntax: "public String generateSas(ShareServiceSasSignatureValues shareServiceSasSignatureValues)" desc: "Generates a service SAS for the directory using the specified \n\nNote : The client must be authenticated via \n\nSee 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 String representing the SAS query parameters." type: "String" - 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 " parameters: - description: "" name: "shareServiceSasSignatureValues" type: "" - description: "Additional context that is passed through the code when generating a SAS." name: "context" type: "" syntax: "public String generateSas(ShareServiceSasSignatureValues shareServiceSasSignatureValues, Context context)" desc: "Generates a service SAS for the directory using the specified \n\nNote : The client must be authenticated via \n\nSee 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 String representing the SAS query parameters." type: "String" - 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: "String" - 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: "String" - 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: "String" - 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 ShareFileClient that interacts with the specified file." parameters: - description: "Name of the file" name: "fileName" type: "String" 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 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: "" - uid: "com.azure.storage.file.share.ShareDirectoryClient.getHttpPipeline()" fullName: "com.azure.storage.file.share.ShareDirectoryClient.getHttpPipeline()" name: "getHttpPipeline()" nameWithType: "ShareDirectoryClient.getHttpPipeline()" summary: "Gets the powering this client." syntax: "public HttpPipeline getHttpPipeline()" desc: "Gets the powering this client." returns: description: "The pipeline." type: "" - 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: "" - 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 will be thrown." name: "timeout" type: "Duration" - description: "Additional context that is passed through the Http pipeline during the service call." name: "context" type: "" syntax: "public Response 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 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: "<>" - 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: "" - 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: "String" - 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 ." syntax: "public String getShareSnapshotId()" desc: "Get snapshot id which attached to . 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 DateTime value that identifies the share snapshot to its base\n share." type: "String" - 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 ShareDirectoryClient that interacts with the specified directory." parameters: - description: "Name of the directory" name: "subdirectoryName" type: "String" 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 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: "" - 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 maxResult in single page." syntax: "public PagedIterable 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: " in the storage directory" type: "<>" - 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: "" - description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a will be thrown." name: "timeout" type: "Duration" - description: "Additional context that is passed through the Http pipeline during the service call." name: "context" type: "" syntax: "public PagedIterable 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: " in this directory with prefix and max number of return results." type: "<>" - 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: "String" - 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 will be preferred over this value." name: "maxResultsPerPage" type: "Integer" - description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a will be thrown." name: "timeout" type: "Duration" - description: "Additional context that is passed through the Http pipeline during the service call." name: "context" type: "" syntax: "public PagedIterable 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: " in this directory with prefix and max number of return results." type: "<>" - 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: "Integer" - description: "Specifies operation should apply to the directory specified in the URI, its files, its\n subdirectories and their files." name: "recursive" type: "" - description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a will be thrown." name: "timeout" type: "Duration" - description: "Additional context that is passed through the Http pipeline during the service call." name: "context" type: "" syntax: "public PagedIterable 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 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: " in the directory that satisfy the requirements" type: "<>" - 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: "String" 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 used to interact with the new file created." type: "" - 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: "" name: "options" type: "" - description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a will be thrown." name: "timeout" type: "Duration" - description: "Additional context that is passed through the Http pipeline during the service call." name: "context" type: "" syntax: "public Response 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 whose contains a used\n to interact with the file created." type: "<>" - uid: "com.azure.storage.file.share.ShareDirectoryClient.setMetadata(java.util.Map)" fullName: "com.azure.storage.file.share.ShareDirectoryClient.setMetadata(Map metadata)" name: "setMetadata(Map metadata)" nameWithType: "ShareDirectoryClient.setMetadata(Map 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: "Map<String,String>" syntax: "public ShareDirectorySetMetadataInfo setMetadata(Map 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: "" - uid: "com.azure.storage.file.share.ShareDirectoryClient.setMetadataWithResponse(java.util.Map,java.time.Duration,com.azure.core.util.Context)" fullName: "com.azure.storage.file.share.ShareDirectoryClient.setMetadataWithResponse(Map metadata, Duration timeout, Context context)" name: "setMetadataWithResponse(Map metadata, Duration timeout, Context context)" nameWithType: "ShareDirectoryClient.setMetadataWithResponse(Map 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: "Map<String,String>" - description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a will be thrown." name: "timeout" type: "Duration" - description: "Additional context that is passed through the Http pipeline during the service call." name: "context" type: "" syntax: "public Response setMetadataWithResponse(Map 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 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 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: "<>" - 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: "" - description: "The file permission of the directory." name: "filePermission" type: "String" 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: "" - 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: "" - description: "The file permission of the directory." name: "filePermission" type: "String" - description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a will be thrown." name: "timeout" type: "Duration" - description: "Additional context that is passed through the Http pipeline during the service call." name: "context" type: "" syntax: "public Response 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 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: "<>" 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 for additional ways to construct the client." metadata: {} package: "com.azure.storage.file.share" artifact: com.azure:azure-storage-file-share:12.23.1