private function mutateFilesToFilesystemInterfaces(Project $project, Cache $cache)
    {
        foreach ($this->files as &$file) {
            /** @var CachedFile $cachedFile */
            if ($cachedFile = $cache->getItem($file->getUid())) {
                if ($cachedFile->check($file)) {
                    $file = new FileIgnored(clone $file, $project->destinationDirectory);
                    continue;
                }
            }

            if ($file->isToCopy()) {
                $file = new FileCopier(clone $file, $project->destinationDirectory);
            } else {
                $file = new FileWriter(clone $file, $project->destinationDirectory);
            }
        }
        unset($file);
    }