When it is necessary to backup a large number files to a type of storage media with a limited size, it may be necessary to use multiple media units to perform a complete backup process.
Since the size of each set of files put in each unit may not fit exactly the media size limit, to avoid splitting a file across multiple units, it may be necessary to redistribute the files to minimize the free space that would be wasted otherwise.
This class implements the bin packing algorithm to perform nearly optimal redistribution of the files that are being copied to target media directories.
The purpose of this class is to copy or move the files to a set of directories, so that the total size of all files in each directory does not exceed a given size limit.
It can can be quite handy in situations where you need to transfer an huge amount of files, which would be a tedious job to perform manually.
This kind of problem is also known as bin packing. Current, this class only solves this problem partially.