expand is a part of Grunt, and not specific for grunt-contrib-copy, information about it can be found in Grunt's file configuration API:
trueto enable the following options:
srcmatches are relative to (but don't include) this path.
srcPattern(s) to match, relative to the
destDestination path prefix.
extReplace any existing extension with this value in generated
extDotUsed to indicate where the period indicating the extension is located. Can take either
'first'(extension begins after the first period in the file name) or
'last'(extension begins after the last period), and is set by default to
flattenRemove all path parts from generated
renameThis function is called for each matched
srcfile, (after extension renaming and flattening). The
srcpath are passed in, and this function must return a new
destvalue. If the same
destis returned more than once, each
srcwhich used it will be added to an array of sources for it.
Additionally it seems like
dest will always be considered to be a destination directory if setting