def _loc_to_file_path(self, path, environ=None):
root_path = self.root_folder_path<EOL>assert root_path is not None<EOL>assert compat.is_native(root_path)<EOL>assert compat.is_native(path)<EOL>path_parts = path.strip("<STR_LIT:/>").split("<STR_LIT:/>")<EOL>file_path = os.path.abspath(os.path.join(root_path, *path_parts))<EOL>if not file_path.startswith(root_path):<EOL><INDENT>raise RuntimeError(<EOL>"<STR_LIT>".format(<EOL>file_path<EOL>)<EOL>)<EOL><DEDENT>file_path = util.to_unicode_safe(file_path)<EOL>return file_path<EOL>
Convert resource path to a unicode absolute file path.
        Optional environ argument may be useful e.g. in relation to per-user
        sub-folder chrooting inside root_folder_path.