<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def save(self, folder, format):
 """save wscorpus to files :param str folder: path to directory :type folder: string :param str format: either TEXT or COLUMN :type format: str """

        try:
            mkdir(folder)
        except Exception:
            pass
        for document in self.documents:
            f = join(folder, document.id)
            content = u"\n".join(document.sentences)
            write(f, content)