def CreateFileVersion(path, content, timestamp, token=None):
 with test_lib.FakeTime(timestamp):
  with aff4.FACTORY.Create(path, aff4_type=aff4_grr.VFSFile, mode='w', token=token) as fd:
   fd.Write(content)
   fd.Set(fd.Schema.CONTENT_LAST, rdfvalue.RDFDatetime.Now())

def CreateFileVersion ( path , content , timestamp , token = None ) : with test_lib . FakeTime ( timestamp ) : with aff4 . FACTORY . Create ( path , aff4_type = aff4_grr . VFSFile , mode = 'w' , token = token ) as fd : fd . Write ( content ) fd . Set ( fd . Schema . CONTENT_LAST , rdfvalue . RDFDatetime . Now ( ) )
add a new version for a file .