Writes defined file using :obj:`SectionsFileParser.sections` and
            :obj:`SectionsFileParser.comments` class properties content.

        Usage::

            >>> sections = {"Section A": {"Section A|Attribute 1": "Value A"}, \
"Section B": {"Section B|Attribute 2": "Value B"}}
            >>> sections_file_parser = SectionsFileParser("SectionsFile.rc")
            >>> sections_file_parser.sections = sections
            >>> sections_file_parser.write()
            True
            >>> sections_file_parser.read()
            u'[Section A]\\nAttribute 1 = Value A\\n\\n[Section B]\\nAttribute 2 = Value B\\n'

        :param namespaces: Attributes are namespaced.
        :type namespaces: bool
        :param splitter: Splitter character.
        :type splitter: unicode
        :param comment_limiter: Comment limiter character.
        :type comment_limiter: unicode
        :param spaces_around_splitter: Spaces around attributes and value splitters.
        :type spaces_around_splitter: bool
        :param space_after_comment_limiter: Space after comments limiter.
        :type space_after_comment_limiter: bool
        :return: Method success.
        :rtype: bool

def write(self,
              namespaces=False,
              splitter="=",
              comment_limiter=(";"),
              spaces_around_splitter=True,
              space_after_comment_limiter=True):
        """
        Writes defined file using :obj:`SectionsFileParser.sections` and
            :obj:`SectionsFileParser.comments` class properties content.

        Usage::

            >>> sections = {"Section A": {"Section A|Attribute 1": "Value A"}, \
"Section B": {"Section B|Attribute 2": "Value B"}}
            >>> sections_file_parser = SectionsFileParser("SectionsFile.rc")
            >>> sections_file_parser.sections = sections
            >>> sections_file_parser.write()
            True
            >>> sections_file_parser.read()
            u'[Section A]\\nAttribute 1 = Value A\\n\\n[Section B]\\nAttribute 2 = Value B\\n'

        :param namespaces: Attributes are namespaced.
        :type namespaces: bool
        :param splitter: Splitter character.
        :type splitter: unicode
        :param comment_limiter: Comment limiter character.
        :type comment_limiter: unicode
        :param spaces_around_splitter: Spaces around attributes and value splitters.
        :type spaces_around_splitter: bool
        :param space_after_comment_limiter: Space after comments limiter.
        :type space_after_comment_limiter: bool
        :return: Method success.
        :rtype: bool
        """

        self.uncache()

        LOGGER.debug("> Setting '{0}' file content.".format(self.path))
        attribute_template = "{{0}} {0} {{1}}\n".format(splitter) if spaces_around_splitter else \
            "{{0}}{0}{{1}}\n".format(splitter)
        attribute_template = foundations.strings.replace(attribute_template, {"{{": "{", "}}": "}"})
        comment_template = space_after_comment_limiter and "{0} {{0}}\n".format(comment_limiter) or \
                           "{0}{{0}}\n".format(comment_limiter)
        if self.__defaults_section in self.__sections:
            LOGGER.debug("> Appending '{0}' default section.".format(self.__defaults_section))
            if self.__comments:
                for comment, value in self.__comments.iteritems():
                    if self.__defaults_section in comment:
                        value = value["content"] or ""
                        LOGGER.debug("> Appending '{0}' comment with '{1}' value.".format(comment, value))
                        self.content.append(comment_template.format(value))
            for attribute, value in self.__sections[self.__defaults_section].iteritems():
                attribute = namespaces and attribute or foundations.namespace.remove_namespace(attribute,
                                                                                               self.__namespace_splitter,
                                                                                               root_only=True)
                value = value or ""
                LOGGER.debug("> Appending '{0}' attribute with '{1}' value.".format(attribute, value))
                self.content.append(attribute_template.format(attribute, value))
            self.content.append("\n")

        for i, section in enumerate(self.__sections):
            LOGGER.debug("> Appending '{0}' section.".format(section))
            self.content.append("[{0}]\n".format(section))
            if self.__comments:
                for comment, value in self.__comments.iteritems():
                    if section in comment:
                        value = value["content"] or ""
                        LOGGER.debug("> Appending '{0}' comment with '{1}' value.".format(comment, value))
                        self.content.append(comment_template.format(value))
            for attribute, value in self.__sections[section].iteritems():
                if foundations.namespace.remove_namespace(attribute) == self.__raw_section_content_identifier:
                    LOGGER.debug("> Appending '{0}' raw section content.".format(section))
                    for line in value:
                        self.content.append(line)
                else:
                    LOGGER.debug("> Appending '{0}' section.".format(section))
                    attribute = namespaces and attribute or foundations.namespace.remove_namespace(attribute,
                                                                                                   self.__namespace_splitter,
                                                                                                   root_only=True)
                    value = value or ""
                    LOGGER.debug("> Appending '{0}' attribute with '{1}' value.".format(attribute, value))
                    self.content.append(attribute_template.format(attribute, value))
            if i != len(self.__sections) - 1:
                self.content.append("\n")
        foundations.io.File.write(self)
        return True