Supported Versions: PHP 4 >= 4.0.3, PHP 5, PHP 7, PHP 8
Returns information about a file path
<?php pathinfo(string $path, int $flags = PATHINFO_ALL): array|string
<?php         foreach ($path as $file) {

            $filePath = $file->getPathname();

            if (!in_array(pathinfo($filePath, PATHINFO_EXTENSION), array('php', 'inc', 'hh'))) {

                continue;

            }
<?php         $this->filesystem->emptyDirectory($path);

        $this->filesystem->ensureDirectoryExists($path);

        $this->filesystem->rename($this->getFileName($package, $path), $path . '/' . pathinfo(parse_url($package->getDistUrl(), PHP_URL_PATH), PATHINFO_BASENAME));



        if ($package->getBinaries()) {
<?php     protected function getFileName(PackageInterface $package, $path)

    {

        return rtrim($this->config->get('vendor-dir').'/composer/tmp-'.md5($package.spl_object_hash($package)).'.'.pathinfo(parse_url($package->getDistUrl(), PHP_URL_PATH), PATHINFO_EXTENSION), '.');

    }
<?php {

    protected function extract(PackageInterface $package, $file, $path)

    {

        $filename = pathinfo(parse_url($package->getDistUrl(), PHP_URL_PATH), PATHINFO_FILENAME);

        $targetFilepath = $path . DIRECTORY_SEPARATOR . $filename;
<?php     public static function getLockFile($composerFile)

    {

        return "json" === pathinfo($composerFile, PATHINFO_EXTENSION)

                ? substr($composerFile, 0, -4).'lock'

                : $composerFile . '.lock';

    }
<?php     {

        $json = null;

        $fileType = null;

        $fileExtension = pathinfo($file->getPathname(), PATHINFO_EXTENSION);

        if (in_array($fileExtension, array('gz', 'tar', 'tgz'), true)) {

            $fileType = 'tar';

        } elseif ($fileExtension === 'zip') {
<?php     {

        if (0 === strpos($repository, 'http')) {

            $repoConfig = array('type' => 'composer', 'url' => $repository);

        } elseif ("json" === pathinfo($repository, PATHINFO_EXTENSION)) {

            $json = new JsonFile($repository, Factory::createHttpDownloader($io, $config));

            $data = $json->read();

            if (!empty($data['packages']) || !empty($data['includes']) || !empty($data['provider-includes'])) {