How to obtain the current time index in Programmable Source


I am prototyping a reader for a code which generates one file per time step. Using advice from here, I was able to correctly read the number of time steps to my Programmable Source and I know I can read the current time step using the helper function below:


def GetUpdateTimestep(algorithm):
    """Returns the requested time value, or None if not present"""
    executive = algorithm.GetExecutive()
    output_info = executive.GetOutputInformation(0)

    return output_info.Get(executive.UPDATE_TIME_STEP()) \
        if output_info.Has(executive.UPDATE_TIME_STEP()) else None

How to obtain the time index instead of the time step value? The indices are clearly displayed in the Information tab of the object.

PS Slightly unrelated, but is it possible to also save the file list in vtkInformation or elsewhere?