Get the real path with package path prepended.

@param string $suffix suffix the file needed
@param bool   $assume Possible directory can be created.

@throws \Exception

@return mixed
497234
public static function prependPackagePath($suffix, $assume = false)
    {
        $path = __DIR__."/../../$suffix";

        if (!$assume and !$path) {
            throw new \Exception("$path path does not exists.");
        }

        return $assume ? $path : realpath($path);
    }
5842
public function getId($suffix = null)
    {
        $id = class_basename(get_called_class());

        if ($this->alias != $this->defaultAlias) {
            $id .= '-' . $this->alias;
        }

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

        return HtmlHelper::nameToId($id);
    }
1025993
public static function randomdir($where, $prefix = '', $suffix = '') {
        global $CFG;

        $dirname    = false;
        $randomname = self::uuidgen($prefix, $suffix, false);
        $newdirname = $where.DIRECTORY_SEPARATOR.$randomname;
        if (mkdir($newdirname)) {
            chmod($newdirname, $CFG->directorypermissions);
            $dirname = $randomname;
        }
        return $dirname;
    }
989163
public static function asClassName(string $value, string $suffix = ''): string
    {
        $value = trim($value);
        $value = str_replace(['-', '_', '.', ':'], ' ', $value);
        $value = ucwords($value);
        $value = str_replace(' ', '', $value);
        $value = ucfirst($value);
        $value = self::addSuffix($value, $suffix);

        return $value;
    }
1316342
def with_suffix(self, suffix):
        
        obj = super(ArtifactoryPath, self).with_suffix(suffix)
        obj.auth = self.auth
        obj.verify = self.verify
        obj.cert = self.cert
        obj.session = self.session
        return obj
202495
public function _input_id( $suffix = '' ) {
		return $this->field->id() . $suffix . ( $this->field->is_repeatable() ? '_' . $this->iterator : '' );
	}
68251
protected function className($suffix = '') {
		$exp = explode('\\', $this->getClass());

		return (!empty($suffix) &&
			substr($exp[count($exp) - 1], (strlen($exp[count($exp) - 1]) - strlen($suffix))) === $suffix) ?
			substr($exp[count($exp) - 1], 0, (strlen($exp[count($exp) - 1]) - strlen($suffix))) :
			$exp[count($exp) - 1];
	}
1006201
def add_suffix(file_path, suffix):
    """"""
    split = os.path.basename(file_path).rsplit('.', 1)
    ext = split[1]
    name = split[0]
    out = str(name + '_' + suffix + '.' + ext)
    return os.path.join(os.path.dirname(file_path), out)
1058339
public static function init($lang,$suffix=''){
		$fn=BLANGUAGESPATH.$lang.$suffix.'.php';
		if(!file_exists($fn)){
			self::regeneratecache();
			}
		if(!file_exists($fn)){
			return false;
			}
		self::$suffix=$suffix;
		if(DEBUG_BLANG){
			BLog::addToLog('[BLang]: Initializing language ('.$lang.')');
			BLog::addToLog('[BLang]: Loading file "'.$fn.'"...');
			}
		include($fn);
		self::$langcode=$lang;
		switch(self::$langcode){
			case 'ru':
				self::$langcode_web='ru-RU';
				break;
			case 'ua':
				self::$langcode_web='uk-UA';
				break;
			}
		}
1182141
public function duplicate($hash, $suffix='copy') {
		if ($this->commandDisabled('duplicate')) {
			return $this->setError(elFinder::ERROR_COPY, '#'.$hash, elFinder::ERROR_PERM_DENIED);
		}
		
		if (($file = $this->file($hash)) == false) {
			return $this->setError(elFinder::ERROR_COPY, elFinder::ERROR_FILE_NOT_FOUND);
		}

		$path = $this->decode($hash);
		$dir  = $this->dirnameCE($path);
		$name = $this->uniqueName($dir, $this->basenameCE($path), ' '.$suffix.' ');

		if (!$this->allowCreate($dir, $name, ($file['mime'] === 'directory'))) {
			return $this->setError(elFinder::ERROR_PERM_DENIED);
		}

		return ($path = $this->copy($path, $dir, $name)) == false
			? false
			: $this->stat($path);
	}
538312
public static function hasSuffix(string $value, string $suffix): bool
    {
        return 0 === strcasecmp($suffix, substr($value, -\strlen($suffix)));
    }
106329
public function getType($suffix)
    {
        if (!array_key_exists($suffix, $this->suffixes)) {
            throw new StoreException(sprintf(
                'Provided suffix (%s) does not exists in database, check existence of entry with isExists() method ' .
                'before',
                $suffix
            ));
        }

        return $this->suffixes[ $suffix ];
    }
998228
public function getPathByConvention($suffix = null)
    {
        $entityName = strtolower($this->getEntityName());
        $entityName = str_replace('\\', '_', $entityName);
        if (empty($suffix)) {
            return sprintf('%s_admin_%s', strtolower($this->getBundleName()), $entityName);
        }

        return sprintf('%s_admin_%s_%s', strtolower($this->getBundleName()), $entityName, $suffix);
    }
891844
public Href path(final Object suffix) {
        return new Href(
            URI.create(
                new StringBuilder(
                    Href.TRAILING_SLASH.matcher(this.uri.toString())
                        .replaceAll("")
                )
                .append('/')
                .append(Href.encode(suffix.toString())).toString()
            ),
            this.params,
            this.fragment
        );
    }
704355
public function duplicate($hash, $suffix='copy') {
		if ($this->commandDisabled('duplicate')) {
			return $this->setError(elFinder::ERROR_COPY, '#'.$hash, elFinder::ERROR_PERM_DENIED);
		}
		
		if (($file = $this->file($hash)) == false) {
			return $this->setError(elFinder::ERROR_COPY, elFinder::ERROR_FILE_NOT_FOUND);
		}

		$path = $this->decode($hash);
		$dir  = $this->_dirname($path);

		return ($path = $this->copy($path, $dir, $this->uniqueName($dir, $this->_basename($path), ' '.$suffix.' '))) == false
			? false
			: $this->stat($path);
	}
759452
public function appendSuffixFilter($path_or_url, $suffix)
    {
        $path = $this->decomposeUrl($path_or_url);
        $path_parts = pathinfo($path['path']);
        $new_path = $path_parts['filename'] . $suffix . "." . $path_parts['extension'];
        if (!empty($path_parts['dirname']) && $path_parts['dirname'] !== ".") {
            $new_path = $path_parts['dirname'] . DIRECTORY_SEPARATOR . $new_path;
            $new_path = preg_replace('#/+#', '/', $new_path);
        }
        $output = $path['prefix'] . $new_path . $path['suffix'];
        return $output;
    }
60421
public function guessViewPathFrom($class, $suffix = '', $isPublic = false)
    {
        $classFolder = strtolower(class_basename($class));
        $classFile = realpath(dirname(File::fromClass($class)));
        $guessedPath = $classFile ? $classFile . '/' . $classFolder . $suffix : null;
        return $isPublic ? File::localToPublic($guessedPath) : $guessedPath;
    }