def extract_file_number(file: File) -> int:
    """Extract file number from the filename."""
    match = re.search(r"file-(\d+)\.txt", file.name)
    if match:
        return int(match.group(1))
    return -1
Extract file number from the filename.
examples/incremental_processing/delta.py