(conn, localpath, remotepath, filter = None, ignore_invalid = False, chunk_size = 16000)
uploads 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 uploaded; None means any file
    :param chunk_size: the IO chunk size
uploads 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 uploaded; None means any file
    :param chunk_size: the IO chunk size
uploads 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 uploaded ; None means any file : param chunk_size : the IO chunk size
def upload(conn, localpath, remotepath, filter = None, ignore_invalid = False, chunk_size = 16000):
    """uploads 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 uploaded; None means any file
    :param chunk_size: the IO chunk size
    """
    if os.path.isdir(localpath):
        upload_dir(conn, localpath, remotepath, filter, chunk_size)
    elif os.path.isfile(localpath):
        upload_file(conn, localpath, remotepath, chunk_size)
    else:
        if not ignore_invalid:
            raise ValueError("cannot upload %r" % (localpath,))
def upload ( conn , localpath , remotepath , filter = None , ignore_invalid = False , chunk_size = 16000 ) : if os . path . isdir ( localpath ) : upload_dir ( conn , localpath , remotepath , filter , chunk_size ) elif os . path . isfile ( localpath ) : upload_file ( conn , localpath , remotepath , chunk_size ) else : if not ignore_invalid : raise ValueError ( "cannot upload %r" % ( localpath , ) )