How are the «generated/medatata» files used in Magento 2.2?

1. Magento\Framework\App\Filesystem\DirectoryList::GENERATED_METADATA

2. Magento\Framework\App\ObjectManager\ConfigLoader\Compiled::getFilePath()

See also: