def delete_directory(self, share_name, directory_name,<EOL>fail_not_exist=False, timeout=None):
_validate_not_none('<STR_LIT>', share_name)<EOL>_validate_not_none('<STR_LIT>', directory_name)<EOL>request = HTTPRequest()<EOL>request.method = '<STR_LIT>'<EOL>request.host_locations = self._get_host_locations()<EOL>request.path = _get_path(share_name, directory_name)<EOL>request.query = {<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>'<STR_LIT>': _int_to_str(timeout),<EOL>}<EOL>if not fail_not_exist:<EOL><INDENT>try:<EOL><INDENT>self._perform_request(request, expected_errors=[_RESOURCE_NOT_FOUND_ERROR_CODE])<EOL>return True<EOL><DEDENT>except AzureHttpError as ex:<EOL><INDENT>_dont_fail_not_exist(ex)<EOL>return False<EOL><DEDENT><DEDENT>else:<EOL><INDENT>self._perform_request(request)<EOL>return True<EOL><DEDENT>
Deletes the specified empty directory. Note that the directory must
be empty before it can be deleted. Attempting to delete directories 
that are not empty will fail.

If the directory does not exist, the operation fails on the
service. By default, the exception is swallowed by the client.
To expose the exception, specify True for fail_not_exist.

:param str share_name:
    Name of existing share.
:param str directory_name:
    Name of directory to delete, including the path to the parent 
    directory.
:param bool fail_not_exist:
    Specify whether to throw an exception when the directory doesn't
    exist.
:param int timeout:
    The timeout parameter is expressed in seconds.
:return: True if directory is deleted, False otherwise.
:rtype: bool