Stores all documents on the file system.

        Target location is **path**. File name is the lowercase name of the document + .rst.

def _store_documentation(self, path, html, overwrite, quiet):
        """
        Stores all documents on the file system.

        Target location is **path**. File name is the lowercase name of the document + .rst.
        """

        echo("Storing groundwork application documents\n")
        echo("Application: %s" % self.app.name)
        echo("Number of documents: %s\n" % len(self.app.documents.get()))

        if not os.path.isabs(path):
            path = os.path.abspath(path)

        if not os.path.isdir(path):
            echo("Path %s is not a directory!" % path)
            sys.exit(1)

        if not os.path.exists(path):
            echo("Path %s does not exist" % path)
            sys.exit(1)

        for dirpath, dirnames, files in os.walk(path):
            if files:
                echo("Path %s is not empty!\n" % path)
                if not overwrite:
                    sys.exit(1)

        documents = []
        for key, document in self.app.documents.get().items():
            file_extension = ".html" if html else ".rst"

            # lowers the name, removes all whitespaces and adds the file extension
            file_name_parts = key.lower().split()
            file_name = "".join(file_name_parts)
            file_name += file_extension
            documents.append((file_name, document))

        echo("Going to write to following files:")
        for document in documents:
            echo("  %s" % document[0])

        echo("\nTarget directory: %s" % path)
        answer = None
        while answer not in ["N", "Y"] and not quiet:
            answer = prompt("Shall we go on? [Y]es, [N]o: ").upper()

        if answer == "N":
            sys.exit(0)

        for document in documents:
            try:
                with open(os.path.join(path, document[0]), "w") as doc_file:
                    doc_rendered = Environment().from_string(document[1].content).render(app=self.app,
                                                                                         plugin=document[1].plugin)
                    if html:
                        output = publish_parts(doc_rendered, writer_name="html")['whole']
                    else:
                        output = doc_rendered

                    doc_file.write(output)
            except Exception as e:
                echo("%s error occurred: %s" % (document[0], e))
            else:
                echo("%s stored." % document[0])