'Helper function to get all relevant input files from the
repository path, excluding files which have not been modified
since the last pull of the task
@param task: the synchronization task
@return: a list of file paths, ordered by their time
stamp (oldest first)'

def _input_files(self, task):

    path = self.repository.path
    if (not os.path.isabs(path)):
        path = os.path.join(current.request.folder, path)
    pattern = task.infile_pattern
    if (path and pattern):
        pattern = os.path.join(path, pattern)
    else:
        return []
    all_files = glob.glob(pattern)
    infiles = []
    append = infiles.append
    msince = task.last_pull
    for f in filter(os.path.isfile, all_files):
        mtime = datetime.datetime.utcfromtimestamp(os.path.getmtime(f))
        if (msince and (mtime <= msince)):
            continue
        append((mtime, f))
    infiles.sort(key=(lambda item: item[0]))
    return [item[1] for item in infiles]
