setGroupingFunction

fun setGroupingFunction(groupingFunction: (String) -> Optional<String>)

Configures a grouping function for files that are part of the same logical group. The gathering of files into a logical group is a hint that allows for better handling of resources.

By default, grouping is .GROUP_BY_SEGMENT. To disable, invoke this method with .NO_GROUPING.

Parameters

groupingFunction

a function that accepts a file name and returns an optional group key. If the optional is present, then its value is the logical group to which the file belongs. Otherwise, the file name if not associated with any logical group.