def setfiletime(path,attr="atime"):
    try:
        statinfo=getstat(path)
        if attr=="atime" or attr=="all":
            os.utime(path,(time.time(),statinfo.st_atime))
        if attr=="mtime" or attr=="all":
            os.utime(path,(time.time(),statinfo.st_mtime))        
        return True
    except Exception as err:
        sys.stderr.write(str(err))
        sys.stderr.write('\n')
        return False
sets the a time of a file to the current time
dataset/ETHPy150Open FredHutch/swift-commander/swift_commander/swsymlinks.py/setfiletime