def readlink(filename):
        """
        Read the contents of C{filename}. See the above comment block as to why
        this is needed.
        """
        try:
            fObj = _open(os.path.join(filename, 'symlink'), 'r')
        except IOError as e:
            if e.errno == errno.ENOENT or e.errno == errno.EIO:
                raise OSError(e.errno, None)
            raise
        else:
            with fObj:
                result = fObj.read()
            return result

        Read the contents of C{filename}. See the above comment block as to why
        this is needed.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/python/lockfile.py