Write a Resource List or a Resource Dump for files on local disk.

        Set of resources included is based on paths setting or else the mappings.
        Optionally links can be added. Output will be to stdout unless outfile
        is specified.

        If dump is true then a Resource Dump is written instead of a Resource
        List. If outfile is not set then self.default_resource_dump will be used.

def write_resource_list(
            self, paths=None, outfile=None, links=None, dump=None):
        """Write a Resource List or a Resource Dump for files on local disk.

        Set of resources included is based on paths setting or else the mappings.
        Optionally links can be added. Output will be to stdout unless outfile
        is specified.

        If dump is true then a Resource Dump is written instead of a Resource
        List. If outfile is not set then self.default_resource_dump will be used.
        """
        rl = self.build_resource_list(paths=paths, set_path=dump)
        if (links is not None):
            rl.ln = links
        if (dump):
            if (outfile is None):
                outfile = self.default_resource_dump
            self.logger.info("Writing resource dump to %s..." % (dump))
            d = Dump(resources=rl, format=self.dump_format)
            d.write(basename=outfile)
        else:
            if (outfile is None):
                try:
                    print(rl.as_xml())
                except ListBaseIndexError as e:
                    raise ClientFatalError(
                        "%s. Use --output option to specify base name for output files." %
                        str(e))
            else:
                rl.write(basename=outfile)