def touch(self):
        """
        Updates the access and last modification times of the file at this
        file path to the current time. Also creates the file if it does not
        already exist.

        @raise Exception: if unable to create or modify the last modification
            time of the file.
        """
        try:
            self.open('a').close()
        except IOError:
            pass
        utime(self.path, None)

        Updates the access and last modification times of the file at this
        file path to the current time. Also creates the file if it does not
        already exist.

        @raise Exception: if unable to create or modify the last modification
            time of the file.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/python/filepath.py