def write(self, directory):
status_file = os.path.join(directory, self.STATUS_FILE)<EOL>status = {<EOL>'<STR_LIT>': self.STATUS_FORMAT,<EOL>'<STR_LIT:version>': coverage.__version__,<EOL>'<STR_LIT>': self.settings,<EOL>'<STR_LIT>': self.files,<EOL>}<EOL>fout = open(status_file, "<STR_LIT:wb>")<EOL>try:<EOL><INDENT>pickle.dump(status, fout)<EOL><DEDENT>finally:<EOL><INDENT>fout.close()<EOL><DEDENT>
Write the current status to `directory`.