def dir_exists(location, use_sudo=False):
with settings(hide('<STR_LIT>', '<STR_LIT>', '<STR_LIT>'), warn_only=True):<EOL><INDENT>if use_sudo:<EOL><INDENT>return not bool(sudo('<STR_LIT>' % (location)).return_code)<EOL><DEDENT>else:<EOL><INDENT>return not bool(run('<STR_LIT>' % (location)).return_code)<EOL><DEDENT><DEDENT>
Tells if there is a remote directory at the given location.