def exists(self, share_name, directory_name=None, file_name=None, timeout=None, snapshot=None):
_validate_not_none('<STR_LIT>', share_name)<EOL>try:<EOL><INDENT>if file_name is not None:<EOL><INDENT>self.get_file_properties(share_name, directory_name, file_name, timeout=timeout, snapshot=snapshot)<EOL><DEDENT>elif directory_name is not None:<EOL><INDENT>self.get_directory_properties(share_name, directory_name, timeout=timeout, snapshot=snapshot)<EOL><DEDENT>else:<EOL><INDENT>self.get_share_properties(share_name, timeout=timeout, snapshot=snapshot)<EOL><DEDENT>return True<EOL><DEDENT>except AzureHttpError as ex:<EOL><INDENT>_dont_fail_not_exist(ex)<EOL>return False<EOL><DEDENT>
Returns a boolean indicating whether the share exists if only share name is
given. If directory_name is specificed a boolean will be returned indicating
if the directory exists. If file_name is specified as well, a boolean will be
returned indicating if the file exists.

:param str share_name:
    Name of a share.
:param str directory_name:
    The path to a directory.
:param str file_name:
    Name of a file.
:param int timeout:
    The timeout parameter is expressed in seconds.
:param str snapshot:
    A string that represents the snapshot version, if applicable.
:return: A boolean indicating whether the resource exists.
:rtype: bool