<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add_file(self, path, yaml):
 """ Adds given file to the file index """


        if is_job_config(yaml):
            name = self.get_job_name(yaml)

            file_data = FileData(path=path, yaml=yaml)
            self.files[path] = file_data
            self.jobs[name] = file_data
        else:
            self.files[path] = FileData(path=path, yaml=yaml)