@wrap_exceptions<EOL><INDENT>def get_open_files(self):<DEDENT>
<EOL>if hasattr(_psutil_bsd, "<STR_LIT>"):<EOL><INDENT>rawlist = _psutil_bsd.get_process_open_files(self.pid)<EOL>return [nt_openfile(path, fd) for path, fd in rawlist]<EOL><DEDENT>else:<EOL><INDENT>lsof = _psposix.LsofParser(self.pid, self._process_name)<EOL>return lsof.get_process_open_files()<EOL><DEDENT>
Return files opened by process as a list of namedtuples.