def getsize(self):
        """
        Retrieve the size of this file in bytes.

        @return: The size of the file at this file path in bytes.
        @raise Exception: if the size cannot be obtained.
        @rtype: L{int}
        """
        st = self._statinfo
        if not st:
            self.restat()
            st = self._statinfo
        return st.st_size

        Retrieve the size of this file in bytes.

        @return: The size of the file at this file path in bytes.
        @raise Exception: if the size cannot be obtained.
        @rtype: L{int}
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/python/filepath.py