function Extension::getFileInfo

Same name in other branches
  1. 11.x core/lib/Drupal/Core/Extension/Extension.php \Drupal\Core\Extension\Extension::getFileInfo()

Returns SplFileInfo instance for the extension's info file.

Return value

\SplFileInfo The object to access a file information of info file.

See also

https://www.php.net/manual/class.splfileinfo.php

1 call to Extension::getFileInfo()
Extension::__call in core/lib/Drupal/Core/Extension/Extension.php
Re-routes method calls to SplFileInfo.

File

core/lib/Drupal/Core/Extension/Extension.php, line 182

Class

Extension
Defines an extension (file) object.

Namespace

Drupal\Core\Extension

Code

public function getFileInfo() : \SplFileInfo {
    if (!isset($this->splFileInfo)) {
        $this->splFileInfo = new \SplFileInfo($this->root . '/' . $this->pathname);
    }
    return $this->splFileInfo;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.