protected function scanDirectory(string $path, string $parentDir): array
    {
        $files = [];

        $rdi = new \RecursiveDirectoryIterator(
            $path,
            \FilesystemIterator::SKIP_DOTS |
            \FilesystemIterator::KEY_AS_FILENAME |
            \FilesystemIterator::CURRENT_AS_FILEINFO
        );

        $rii = new \RecursiveIteratorIterator($rdi);

        $needle = Constants::DS.$parentDir.Constants::DS;
        $len = \strlen($needle);
        foreach ($rii as $fileInfo) {
            $path = $fileInfo->getPathname();
            $pos = \strrpos($path, $needle);
            $files[] = \substr($path, $pos + $len);
        }

        return $files;
    }