def exists(path, remote=True): ''' Check if the path exists in the remote or locally, depending upon the `remote` parameter. ''' if remote: return files.exists(path) return os.path.exists(path)