'Add a file with timeline.'

@staticmethod
def CreateFileWithTimeline(file_path, token):

    with test_lib.FakeTime(gui_test_lib.TIME_0):
        with aff4.FACTORY.Create(file_path, aff4_grr.VFSAnalysisFile, mode='w', token=token) as fd:
            stats = rdf_client.StatEntry(st_atime=(gui_test_lib.TIME_0.AsSecondsFromEpoch() + 1000), st_mtime=gui_test_lib.TIME_0.AsSecondsFromEpoch(), st_ctime=(gui_test_lib.TIME_0.AsSecondsFromEpoch() - 1000))
            fd.Set(fd.Schema.STAT, stats)
    with test_lib.FakeTime(gui_test_lib.TIME_1):
        with aff4.FACTORY.Create(file_path, aff4_grr.VFSAnalysisFile, mode='w', token=token) as fd:
            stats = rdf_client.StatEntry(st_ino=99)
            fd.Set(fd.Schema.STAT, stats)
