Gets the license filename.

@param string $licenseName

@return string Filename or empty-string if not exists
499729
protected function getLicenseFile($licenseName)
    {
        return isset($this->licenses[strtoupper($licenseName)]) ? $this->licenses[strtoupper($licenseName)] : '';
    }
928307
protected final function fileName(string $className): string
    {
        $fileName = "";
        if (array_key_exists($className, $this->className)) {
            $fileName = $this->className[$className];
            $this->removeClass($className);
        }
        return $fileName;
    }
97233
public function extName($extName = null)
    {
        if (func_num_args() > 0) {
            $parts = pathinfo($this->_name);
            $this->_name = "{$parts['dirname']}/{$parts['filename']}.{$extName}";
            return $this;
        }
        return pathinfo($this->_name, PATHINFO_EXTENSION);
    }
1231072
public static function getFilename()
    {
        if (\is_dir(\dirname(self::$filename))) {
            return self::$filename;
        }

        return (getcwd() ?: './').'/'.self::$filename;
    }
545905
public function getByQualifiedName(string $qualifiedName = null) {
		if ($qualifiedName === null) return null;
		
		return $this->getFileEngine()->getByQualifiedName($qualifiedName);
	}
1068530
protected function generateFileName($fileName = null)
    {
        $sha1Hash = $fileName === null ? sha1($this->fileContents) : $fileName;

        $resultFilePath = $sha1Hash;
        if ($fileType = $this->guessFileType()) {
            $resultFilePath .= '.'.$fileType;
        }

        return trim($resultFilePath, '/');
    }
359561
protected function getXsltUriFromFilename($filename)
    {
        // Windows requires an additional / after the scheme. If not provided then errno 22 (I/O Error: Invalid
        // Argument) will be raised. Thanks to @FnTmLV for finding the cause. See issue #284 for more information.
        // An exception to the above is when running from a Phar file; in this case the stream is handled as if on
        // linux; see issue #713 for more information on this exception.
        if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN' && ! \Phar::running()) {
            $filename = '/' . $filename;
        }

        return 'file://' . $filename;
    }
1361363
public function fetchName(string $filename): ?string
    {
        return str_replace('\\', '/', substr($filename, 0, -1 * (1 + strlen($this->extension))));
    }
869717
public static function getFilename($name, $arguments = false)
    {
        $filename = strtolower(self::filterAlphanumeric($name));

        if ($arguments) {
            $filename .= '.' . md5(print_r($arguments, true));
        }

        return $filename . '.fix';
    }
496989
public static function get($slug = null)
    {
        $licenses = self::getLicenseFile();
        $data = (array)$licenses->content();
        $licenses->free();
        $slug = strtolower($slug);

        if (!$slug) {
            return $data['licenses'] ?? [];
        }

        return $data['licenses'][$slug] ?? '';
    }
697162
public function setFileName($filename)
  {
    if ($this->isLocked()) {
      return $this->getObj()->setFileName($filename)->setLocked();
    } else {
      return parent::setFileName($filename);
    }
  }
1157725
public function getTemplateNamesForFilename($filename)
    {
        $map = $this->getMap();
        $matching = array_filter(array_keys($map), function ($path) use ($filename) {
            return $filename[0] === $path[0] && 0 === strpos($filename, $path);
        });

        $templateNames = [];
        foreach ($matching as $match) {
            $namespace = $map[$match];
            $templateNames[] = self::MAIN_NAMESPACE === $namespace
                ? ltrim(substr($filename, strlen($match)), '/\\')
                : '@'.$namespace.substr($filename, strlen($match));
        }

        return $templateNames;
    }
203861
public static function resolveFileName(string $fileName): string
    {
        $suffix = '.php';
        $pathParts = explode($suffix, str_replace(
            [self::$rewriteToPath, DIRECTORY_SEPARATOR . '_proxies'],
            [self::$rootPath, ''],
            $fileName
        ));
        // throw away namespaced path from actual filename
        return $pathParts[0] . $suffix;
    }
874681
public function getFileDirPrefix($filename)
    {
        if (empty($filename)) {
            throw new InvalidArgumentException('Invalid filename argument');
        }

        $path = array();
        $parts = explode('.', $filename);

        for ($i = 0; $i < min(strlen($parts[0]), $this->prefixSize); $i++) {
            $path[] = $filename[$i];
        }

        $path = $this->getPath($path);

        return $path;
    }
441948
protected function fileBasename( $name )
    {
        $pos = strrpos( $name, '.' );
        if ( $pos !== false )
        {
            $name = substr( $name, 0, $pos );
        }
        return $name;
    }
742977
def get_license(name):
    '''
    
    '''

    filenames = os.listdir(cwd + licenses_loc)
    licenses = dict(zip(filenames, [-1] * len(filenames)))

    for l in licenses:
        licenses[l] = compute_distance(name, l)

    return min(licenses, key=(lambda k: licenses[k]))
889923
private License getLicense(final String licenseId) {
        License result = null;
        final Set<DbLicense> matchingLicenses = licenseMatcher.getMatchingLicenses(licenseId);

        if (matchingLicenses.isEmpty()) {
            result = DataModelFactory.createLicense("#" + licenseId + "# (to be identified)", NOT_IDENTIFIED_YET, NOT_IDENTIFIED_YET, NOT_IDENTIFIED_YET, NOT_IDENTIFIED_YET);
            result.setUnknown(true);
        } else {
            if (matchingLicenses.size() > 1 && LOG.isWarnEnabled()) {
                LOG.warn(String.format("%s matches multiple licenses %s. " +
                                "Please run the report showing multiple matching on licenses",
                        licenseId, matchingLicenses.toString()));
            }
            result = mapper.getLicense(matchingLicenses.iterator().next());

        }

        return result;
    }