(conn, remotepath, localpath, filter = None, ignore_invalid = False, chunk_size = 16000)
download a file or a directory to the given remote path
    
    :param localpath: the local file or directory
    :param remotepath: the remote path
    :param filter: a predicate that accepts the filename and determines whether
                   it should be downloaded; None means any file
    :param chunk_size: the IO chunk size
download a file or a directory to the given remote path
    
    :param localpath: the local file or directory
    :param remotepath: the remote path
    :param filter: a predicate that accepts the filename and determines whether
                   it should be downloaded; None means any file
    :param chunk_size: the IO chunk size
download a file or a directory to the given remote path : param localpath : the local file or directory : param remotepath : the remote path : param filter : a predicate that accepts the filename and determines whether it should be downloaded ; None means any file : param chunk_size : the IO chunk size
def download(conn, remotepath, localpath, filter = None, ignore_invalid = False, chunk_size = 16000):
    """
    download a file or a directory to the given remote path
    
    :param localpath: the local file or directory
    :param remotepath: the remote path
    :param filter: a predicate that accepts the filename and determines whether
                   it should be downloaded; None means any file
    :param chunk_size: the IO chunk size
    """
    if conn.modules.os.path.isdir(remotepath):
        download_dir(conn, remotepath, localpath, filter)
    elif conn.modules.os.path.isfile(remotepath):
        download_file(conn, remotepath, localpath, chunk_size)
    else:
        if not ignore_invalid:
            raise ValueError("cannot download %r" % (remotepath,))
def download ( conn , remotepath , localpath , filter = None , ignore_invalid = False , chunk_size = 16000 ) : if conn . modules . os . path . isdir ( remotepath ) : download_dir ( conn , remotepath , localpath , filter ) elif conn . modules . os . path . isfile ( remotepath ) : download_file ( conn , remotepath , localpath , chunk_size ) else : if not ignore_invalid : raise ValueError ( "cannot download %r" % ( remotepath , ) )