private function filterContentsByType(array $contents, string $type): array
    {
        $results = [];

        foreach ($contents as $key => $value) {
            if (isset($value['type']) && $value['type'] === $type) {
                $results[$key] = $value['path'];
            }
        }

        return $results;
    }