Путь к файлу в этом расширении

@param $filePath
@return null|string
338654
public function getFilePath($filePath)
    {
        $composerFiles = [];
        foreach ($this->alias as $name => $path) {
            $composerFiles[] = $path . '/' . $filePath;
        }

        return FileHelper::getFirstExistingFileArray($composerFiles);
    }
370792
protected function logFilename($filename, $filePath)
    {
        $filePath = trim(rtrim($filePath, "\/"));
        $filename = trim(trim($filename, "\/"));

        $path = $filePath . DIRECTORY_SEPARATOR . $filename;

        if (!realpath($path) || !file_exists($path)) {
            touch($path);
        }

        return realpath($path);
    }
1087615
public static function getIncludePath($filepath)
    {
        static $_include_path = null;

        if ($_path_array === null) {
            $_include_path = explode(PATH_SEPARATOR, get_include_path());
        }

        foreach ($_include_path as $_path) {
            if (file_exists($_path . DS . $filepath)) {
                return $_path . DS . $filepath;
            }
        }
        
        return false;
    }
372996
public function getFileContent($filePath)
    {
        if ($this->repository->fileExists($filePath) === false) {
            throw new Exception(sprintf('The file "%s" cannot be found', $filePath));
        }
        return $this->repository->getFileContent($filePath);
    }
280184
protected function getProperty(string $filePath, string $keyName)
    {
        $statements = $this->parseFile($filePath);
        if (empty($statements)) {
            return null;
        }

        return $this->getPropertyRecursive($keyName, $statements);
    }
116118
private function getClassNameFromFile($filepath)
    {
        $contents = file_get_contents($filepath);
        $namespace = $class = '';
        $getting_namespace = $getting_class = false;
        foreach (token_get_all($contents) as $token) {
            if (is_array($token) && $token[0] == T_NAMESPACE) {
                $getting_namespace = true;
            }

            if (is_array($token) && in_array($token[0], [T_CLASS, T_TRAIT, T_INTERFACE])) {
                $getting_class = true;
            }

            if ($getting_namespace === true) {
                if (is_array($token) && in_array($token[0], [T_STRING, T_NS_SEPARATOR])) {
                    $namespace .= $token[1];
                } elseif ($token === ';') {
                    $getting_namespace = false;
                }
            }

            if ($getting_class === true) {
                if (is_array($token) && $token[0] == T_STRING) {
                    $class = $token[1];
                    break;
                }
            }
        }

        return $namespace ? $namespace.'\\'.$class : $class;
    }
968570
protected function get_file_content(string $filepath) : String {
        $content = file_get_contents($filepath);
        if ($content === false) {
            throw new \moodle_exception('cannotopenfile', 'error', '', $filepath);
        }
        return $content;
    }
172754
public function setFilePath($filePath)
    {
        $this->isURI = false;
        $this->filePath = trim($filePath);

        $this->content = null;
        return $this;
    }
37023
protected function getMethodObject(string $filePath, string $methodName)
    {
        $statements = $this->parseFile($filePath);
        if (empty($statements)) {
            return null;
        }
        $method = $this->getFunction($methodName, $statements);
        if (empty($method)) {
            return null;
        }

        return $method;
    }
25126
static function dirpath( $filepath )
    {
        $filepath = eZDir::cleanPath( $filepath, self::SEPARATOR_UNIX );
        $dirPosition = strrpos( $filepath, '/' );
        if ( $dirPosition !== false )
            return substr( $filepath, 0, $dirPosition );
        return $filepath;
    }
465003
protected function readFile(string $filePath): string
    {
        /**
         * read bin
         */
        $handle = fopen($filePath, 'rb');
        $stream = fread($handle, $this->maxByteCacheLen);
        fclose($handle);
        return $stream;
    }
466465
public function setFilePath($filePath)
    {
        $this->filePath = $filePath;
        $this->releaseHandle();
        $this->onFileChanged();

        return $this;
    }
202705
public static function getPathinfoPart(string $filePath, int $fileInfOoptions) : string
    {
        if ($filePath == '' || is_dir($filePath) || DirHelper::endsWithSlash($filePath)) {
            return '';
        }

        $info = pathinfo($filePath, $fileInfOoptions);

        if ($info == '.' && $fileInfOoptions == PATHINFO_DIRNAME) {
            return '';
        }
        return ($info !== null && $info != '') ? $info : '';
    }
899981
private function toDatabaseFilePath($filePath)
    {
        if ($filePath === null) {
            $temporaryFile =  sys_get_temp_dir() . '/' . uniqid('db-', true) . '.sqlite';
            // Ensure that the temporary file is removed on shutdown, otherwise the filesystem
            // might be cluttered with database files.
            register_shutdown_function(array($this, 'cleanUp'));
            return $temporaryFile;
        }
        return $filePath;
    }
415811
public function parseFile($filePath, array $vars = [])
    {
        if (is_file($filePath)) {
            return $this->parseString(file_get_contents($filePath), $vars);
        }

        // Try to find from filePaths
        if (count($this->filePaths)) {
            foreach ($this->filePaths as $fileDirectory) {
                if (is_file($fileDirectory . $filePath)) {
                    return $this->parseString(file_get_contents($fileDirectory . $filePath), $vars);
                    break;
                }
            }
        }

        return null;
    }
1043111
public function extract($filePath)
    {
        $directory = $this->directory->getDirectoryPath();
        $pharArchive = new PharData($filePath, null, null, Phar::GZ);
        $pharArchive->extractTo($directory);

        return $this->createFinderFromDirectory($directory);
    }
1094637
public static function getFilename($filepath)
    {
        $explode_filepath = explode('/', $filepath);
        return \Library\Helper\File::getHumanReadableFilename(end($explode_filepath));
    }