Name of the file or directory

@param string|NULL $suffix       file suffix which is ignored.

@return string
174026
public function getName( $suffix = NULL ) : string
    {
        $name = $suffix ? basename( $this->path, $suffix ) : basename( $this->path );

        return $name;
    }
1042513
protected function nameArchive($dir, $suffix = null)
    {
        if (!empty($suffix)) {
            $suffix = '_'.preg_replace('/[^0-9a-z]+/i', '-', $suffix);
        }

        return sprintf('%s%s_%s.zip', str_replace(DIRECTORY_SEPARATOR, '_', $dir), $suffix, $this->now->format('Y-m-d_H-i'));
    }
394048
private function setSuffix(string $suffix): FullNameEmbeddableInterface
    {
        $this->notifyEmbeddablePrefixedProperties(
            'suffix',
            $this->suffix,
            $suffix
        );
        $this->suffix = $suffix;

        return $this;
    }
483544
public function getNameByIndex($index)
    {
        return isset($this->names[$index]) ? $this->names[$index] : null;
    }
510628
public function checkFilename($file)
    {
        $newFilename  = $file;
        $parts        = pathinfo($file);
        $origFilename = $parts['filename'];
        $ext          = (isset($parts['extension']) && ($parts['extension'] != '')) ? '.' . $parts['extension'] : null;

        $i = 1;

        while (file_exists($this->uploadDir . DIRECTORY_SEPARATOR . $newFilename)) {
            $newFilename = $origFilename . '_' . $i . $ext;
            $i++;
        }

        return $newFilename;
    }
202327
public function filename($filename = null)
    {
        if ($filename === null) {
            return $this->_filename;
        }
        $this->_filename = $filename;
    }
91592
public function getName($file = "", $default = null)
    {

        $file = (empty($file) && isset($this->file)) ? $this->file : $file;

        if (empty($file)) {
            return $default;
        }

        //Determine the filename
        return pathinfo($file, PATHINFO_FILENAME);
    }
346203
protected function getFilename(Dictionary $dictionary, string $extension, string $suffix = '')
    {
        return $this->convertToValidFilenameWithoutExtension(
            ($dictionary->getMetadata()['@title'] ?? self::DEFAULT_FILENAME) . $suffix
        ) . ".$extension";
    }
443108
public function relationGetId($suffix = null)
    {
        $id = class_basename($this);
        if ($this->field) {
            $id .= '-' . $this->field;
        }

        if ($suffix !== null) {
            $id .= '-' . $suffix;
        }

        return $this->controller->getId($id);
    }
1088995
public function getPrefix($suffix = null)
    {
        $prefix = $this->console->option('prefix');

        return $prefix ? $prefix.$suffix : null;
    }
584690
public function setSuffix($suffix)
    {
        $this->_suffix = $suffix;
        $this->request->setPathInfo(implode('/', [$this->module->id, $suffix]));
    }
989703
public function getTemplatesWithSuffix($suffix)
    {
        $templates = SSViewer::get_templates_by_class(get_class($this), $suffix, __CLASS__);
        return SSViewer::chooseTemplate($templates);
    }
792611
public function setContextualClassSuffix($suffix)
    {
        $this->attributes->removeAttributeClass([
            $this->contextualClassPrefix . '-' . 'default',
            $this->contextualClassPrefix . '-' . 'primary',
            $this->contextualClassPrefix . '-' . 'secondary',
            $this->contextualClassPrefix . '-' . 'success',
            $this->contextualClassPrefix . '-' . 'info',
            $this->contextualClassPrefix . '-' . 'warning',
            $this->contextualClassPrefix . '-' . 'danger',
            $this->contextualClassPrefix . '-' . 'neutral',
        ]);
        $this->attributes->addAttributeClass($this->contextualClassPrefix . '-' . $suffix);

        return $this;
    }
887343
public function endsWithIgnoreCase($suffix) {
		$other = new Str($suffix, $this->charset);

		return mb_strripos($this->rawString, $suffix, 0, $this->charset) === ($this->length() - $other->length());
	}
178913
public function setSuffix($suffix) {

		if(false === is_string($suffix)) {
			return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($suffix)), E_USER_ERROR);
		}

		$this -> suffix = $suffix;

		return $this;
	}
831924
public function endsWith($suffix)
    {
        return $suffix === ''
        || $suffix === mb_substr(
            $this->contents,
            -strlen((string) $suffix),
            null,
            $this->encoding
        );
    }
209135
public function getId($suffix = null)
    {
        $id = 'scope';
        $id .= '-'.$this->scopeName;

        if ($suffix) {
            $id .= '-'.$suffix;
        }

        if ($this->idPrefix) {
            $id = $this->idPrefix . '-' . $id;
        }

        return HtmlHelper::nameToId($id);
    }