def touch(self, path):
if self.touch_only.value:
os.utime(path, None)
else:
with open(path) as fd:
content = fd.read()
content = "#line 1\n" + content
with open(path, "w") as fd:
fd.write(content)