def create(self):
        """
        Exclusively create a file, only if this file previously did not exist.

        @return: A file-like object opened from this path.
        """
        fdint = os.open(self.path, _CREATE_FLAGS)

        # XXX TODO: 'name' attribute of returned files is not mutable or
        # settable via fdopen, so this file is slightly less functional than the
        # one returned from 'open' by default.  send a patch to Python...

        return os.fdopen(fdint, 'w+b')

        Exclusively create a file, only if this file previously did not exist.

        @return: A file-like object opened from this path.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/python/filepath.py