def writeProject(self, session, directory, name):
        """
        Write all files for a project from the database to file.

        Use this method to write all GsshaPy supported files back into their native file formats. If writing to execute
        the model, increase efficiency by using the writeInput method to write only the file needed to run the model.

        Args:
            session (:mod:`sqlalchemy.orm.session.Session`): SQLAlchemy session object bound to PostGIS enabled database
            directory (str): Directory where the files will be written.
            name (str): Name that will be given to project when written (e.g.: 'example'). Files that follow the project
                naming convention will be given this name with the appropriate extension (e.g.: 'example.prj',
                'example.cmt', and 'example.gag'). Files that do not follow this convention will retain their original
                file names.
        """
        self.project_directory = directory
        with tmp_chdir(directory):
            # Get the batch directory for output
            batchDirectory = self._getBatchDirectory(directory)

            # Get param file for writing
            replaceParamFile = self.replaceParamFile

            # Write the replacement files
            self._writeReplacementFiles(session=session, directory=directory, name=name)

            # Write Project File
            self.write(session=session, directory=directory, name=name)

            # Write input files
            self._writeXput(session=session, directory=directory, fileCards=self.INPUT_FILES, name=name, replaceParamFile=replaceParamFile)

            # Write output files
            self._writeXput(session=session, directory=batchDirectory, fileCards=self.OUTPUT_FILES, name=name)

            # Write input map files
            self._writeXputMaps(session=session, directory=directory, mapCards=self.INPUT_MAPS, name=name, replaceParamFile=replaceParamFile)

            # Write WMS Dataset Files
            self._writeWMSDatasets(session=session, directory=batchDirectory, wmsDatasetCards=self.WMS_DATASETS, name=name)
Write all files for a project from the database to file.

        Use this method to write all GsshaPy supported files back into their native file formats. If writing to execute
        the model, increase efficiency by using the writeInput method to write only the file needed to run the model.

        Args:
            session (:mod:`sqlalchemy.orm.session.Session`): SQLAlchemy session object bound to PostGIS enabled database
            directory (str): Directory where the files will be written.
            name (str): Name that will be given to project when written (e.g.: 'example'). Files that follow the project
                naming convention will be given this name with the appropriate extension (e.g.: 'example.prj',
                'example.cmt', and 'example.gag'). Files that do not follow this convention will retain their original
                file names.