<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def injected(self, filename):
 """ Return true if the file has already been injected before. """

        full_path = os.path.expanduser(filename)
        if not os.path.exists(full_path):
            return False
        with codecs.open(full_path, 'r+', encoding="utf-8") as fh:
            contents = fh.read()
        return self.wrapper_match.search(contents) is not None