Provide an SplFileInfo object, asserting that the path exists

@return \SplFileInfo
@throws DoctrineStaticMetaException
430097
public function getSplFileInfo(): \SplFileInfo
    {
        if (null !== $this->splFileInfo && $this->path === $this->splFileInfo->getRealPath()) {
            return $this->splFileInfo;
        }
        $this->assertExists();

        return $this->createSplFileInfo();
    }
656916
protected function createCurrentSiteInfo()
    {
        while ( $this->queryResult->valid() )
        {
            $data       = $this->queryResult->current();
            $current    = $this->createSiteInfo( $data );
            $schema     = $current->getSchema();

            if ( ! empty( $this->queriedSchemas[$schema] ) )
            {
                $this->queryResult->next();
            }
            else
            {
                $this->queriedSchemas[$schema] = true;
                return $this->setSiteInfo( $this->currentSiteInfo = $current );
            }
        }

        $this->currentSiteInfo = null;
        return null;
    }
277669
protected static function getSchema()
    {
        static $cache = null;
        if (!isset($cache)) {
            $schemaFile = __DIR__.'/doctrine-xml-0.5.xsd';
            $s = (is_file($schemaFile) && is_readable($schemaFile)) ? @file_get_contents($schemaFile) : false;
            if ($s === false) {
                throw new Exception('Failed to load the schema file '.$schemaFile);
            }
            $cache = $s;
        }

        return $cache;
    }
836371
public static function createFromSplFileInfo(\SplFileInfo $file)
    {
        $asset = new Asset();
        $guesser = MimeTypeGuesser::getInstance();
        return $asset
            ->setFilename($file->getFilename())
            ->setExtension($file->getExtension())
            ->setPathname($file->getPathname())
            ->setMimeType($guesser->guess($file->getPathname()))
            ->setClientOriginalName($file->getFilename())
            ->setClientOriginalExtension($file->getExtension())
        ;
    }
244358
@Override
    public String getPathInfo() {
        try {
            collaborator.preInvoke(componentMetaData);
            return request.getPathInfo();
        } finally {
            collaborator.postInvoke();
        }
    }
1274710
public function getFilePathContent() {
        if($this->filePathContent === null){
            throw new InvalidArgumentException(sprintf("The filePathContent must be setter."));
        }
        $path = $this->filePathContent;
        if($this->container){
            $path = $this->container->get("kernel")->locateResource($this->filePathContent);
        }
        if(!$this->chainModel->getExporterManager()->getFs()->exists($path)){
            throw new InvalidArgumentException(sprintf("The filePathContent '%s' does not exist.",$path));
        }
        return $path;
    }
1108990
public function scan() : ParseQueue
    {
        // completely populate the splFileInfos property
        $this->fileInfos = [];
        foreach ($this->finder as $fileInfo) {
            $relativeFilename = $fileInfo->getRelativePathname();
            // strip off the extension
            $documentPath = substr($relativeFilename, 0, -(strlen($this->fileExtension) + 1));

            $this->fileInfos[$documentPath] = $fileInfo;
        }

        $parseQueue = new ParseQueue();
        foreach ($this->fileInfos as $filename => $fileInfo) {
            $parseQueue->addFile(
                $filename,
                $this->doesFileRequireParsing($filename, $parseQueue)
            );
        }

        return $parseQueue;
    }
403067
public function getCollectionPathObject()
    {
        $em = \ORM::entityManager();
        $cID = ($this->getCollectionPointerOriginalID() > 0) ? $this->getCollectionPointerOriginalID() : $this->cID;
        $path = $em->getRepository('\Concrete\Core\Entity\Page\PagePath')->findOneBy(
            ['cID' => $cID, 'ppIsCanonical' => true,
        ]);

        return $path;
    }
1192760
public function getFiles()
    {
        if (empty($this->files)) {
            foreach ($this->path as $path) {
                if (is_dir($path)) {
                    $this->files = array_merge($this->files, $this->getFilesFromDir($path));
                } elseif (is_file($path)) {
                    $this->files[$path] = new SplFileInfo($path, $path, $path);
                }
            }
        }

        return $this->files;
    }
775582
public function getDestinationPath()
    {
        if ($this->path) {
            return $this->path;
        }

        return $this->repository->getComponentPath($this->getComponentName());
    }
1064154
public function getPathInfo()
    {
        if ($this->pathInfo === null) {
            $end = strpos($this->uri, '?');

            if ($end === false) {
                $this->pathInfo = $this->uri;
            }else{
                $this->pathInfo = substr($this->uri, 0, $end);
            }

            if (empty($this->pathInfo)) {
                $this->pathInfo = '/';
            }
        }
        
        return $this->pathInfo;
    }
1251141
protected function setExtensionPath()
    {
        $filename = (new ReflectionClass($this))->getFileName();

        return $this->extensionPath = (new SplFileInfo($filename))->getPath();
    }
159310
private function getFileInfo(string $fileName, bool $withSize = false): FileInfo
	{
		$file = new SplFileInfo($this->getFullPath($fileName));
		return new FileInfo($file, $withSize);
	}
1266909
public static function setPathCreated(string $path): void
    {
        if (!self::$registered) {
            self::$registered = self::registerShutdownFunction();
        }
        $realPath = realpath($path);
        if (!$realPath) {
            throw new DoctrineStaticMetaException("path $path does not seem to exist");
        }
        self::$pathsCreated[$realPath] = $realPath;
    }
1264415
public function getContent()
    {
        if (!($pathname = $this->getPathname())) {
            throw new \LogicException('No pathname was specified - maybe it came from DigiDoc web service?');
        }

        $level = error_reporting(0);
        $content = file_get_contents($pathname);
        error_reporting($level);

        if (false === $content) {
            $error = error_get_last();
            throw new RuntimeException($error['message']);
        }

        return $content;
    }
320836
public function getContents()
    {
        try {
            $fileObj = new SplFileObject($this->getName(true) , 'r');
        } catch ( RuntimeException $ex ) {
            throw new FileExistException('The provided file is not readable' , $ex);
        }

        return file_get_contents($fileObj->getPathname());
    }
385070
protected function getResourceInfo()
    {
        if (($this->currentVersion === null) ||
             (($info = \Arbit\VCSWrapper\Cache\Manager::get($this->path, $this->currentVersion, 'info')) === false))
        {
            // Refetch the basic information, and cache it.
            $process = new \Arbit\VCSWrapper\SvnCli\Process('svn', $this->username, $this->password);
            $process->argument('--xml');

            // Fetch for specified version, if set
            if ($this->currentVersion !== null) {
                $process->argument('-r' . $this->currentVersion);
            }

            // Execute info command
            $return = $process->argument('info')->argument(new \SystemProcess\Argument\PathArgument($this->root . $this->path))->execute();

            $info = \Arbit\Xml\Document::loadString($process->stdoutOutput);
            \Arbit\VCSWrapper\Cache\Manager::cache($this->path, $this->currentVersion = (string) $info->entry[0]->commit[0]['revision'], 'info', $info);
        }

        return $info;
    }