Lines Matching refs:new_file
676 new_file = _create_temporary(self._path)
679 self._pre_mailbox_hook(new_file)
683 self._pre_message_hook(new_file)
684 new_start = new_file.tell()
690 new_file.write(buffer)
691 new_toc[key] = (new_start, new_file.tell())
692 self._post_message_hook(new_file)
693 self._file_length = new_file.tell()
695 new_file.close()
696 os.remove(new_file.name)
698 _sync_close(new_file)
703 os.chmod(new_file.name, mode)
705 os.rename(new_file.name, self._path)
708 os.rename(new_file.name, self._path)