function getInstallerFiles( config ) {
	return function( grunt ) {
		const cwd = grunt.config( `template.${config}.options.data.dirinput` );
		const getFiles = filter => grunt.file.expand( { cwd, filter }, "**" )
			.map( path => path.replace( /\//g, "\\" ) );

		return JSON.stringify({
			files: getFiles( "isFile" ),
			directories: getFiles( "isDirectory" )
				// ensure that subdirectories will get removed first
				.sort()
				.reverse()
		});
	};
}
Factory function for creating a function to be called by the Windows installer template config
@param {string} config
@returns {Function}