<FileGroup> Element

Defines a rule by which files will be added to a chunk, a collection of files that should be installed as a group.

Syntax

<FileGroup
  SourcePath = string
  DestinationPath = string
  Include = string />  

Attributes

SourcePath
Required. Source of files that the rule will be run against. The path is relative to the content directory passed in with the /d parameter to the makepkg tool.

DestinationPath
Required. Specifies the target destination for where files matched by the rule will be placed in the file system of the generated image. This attribute should specify the directory name, not including the filename.

Include
Required. Rule for matching files under this source location. You can use a path relative to the source location, the standard ‘*’ and ‘?’ wildcards, and/or environment variables.

Remarks

This element is not recursive, and every directory to be included must be specified by its own FileGroup element.

The MakePkg.exe packaging tool expands the last chunk in a title’s layout to meet alignment requirements. Content updates to any chunk will therefore typically cause the last chunk to change its size, and the system will redownload it. For large last chunks, this will mean a large content update download, even if the chunk’s contents haven’t changed. To minimize download size, exclusive resource apps must include a special alignment chunk referring to a one-byte file at the end of their layout XML file:

<Chunk Id="1073741823">
  <FileGroup DestinationPath="\" SourcePath=".\" Include="Update.AlignmentChunk"/>
</Chunk>  

Exclusive resource apps that are missing the alignment chunk and one-byte file requirement will log a warning, which will cause a certification failure if not corrected prior to submission.

Element information

Parent elements Chunk
Child elements  

Example

<FileGroup DestinationPath="\Data\Maps" SourcePath="Y:\Maps\Level1" Include="*.map"/>
<FileGroup DestinationPath="\Data\Maps" SourcePath="Y:\Maps\Level2" Include="*.map"/>
<FileGroup DestinationPath="\Data\Maps" SourcePath="Y:\Maps\Level3" Include="*.map"/>