def exists(self, remote_path):
        """
        Validate whether a remote file or directory exists.

        :param remote_path: Path to remote file.
        :type remote_path: ``str``

        :rtype: ``bool``
        """
        try:
            self.sftp.lstat(remote_path).st_mode
        except __HOLE__:
            return False

        return True
dataset/ETHPy150Open StackStorm/st2/st2actions/st2actions/runners/ssh/paramiko_ssh.py/ParamikoSSHClient.exists