def write_file(self, file):
        """
        Writes the editor file content into given file.

        :param file: File to write.
        :type file: unicode
        :return: Method success.
        :rtype: bool
        """

        LOGGER.debug("> Writing '{0}' file.".format(file))
        writer = foundations.io.File(file)
        writer.content = [self.toPlainText().toUtf8()]
        if writer.write():
            self.set_file(file)

            self.file_saved.emit()
            return True
Writes the editor file content into given file.

        :param file: File to write.
        :type file: unicode
        :return: Method success.
        :rtype: bool