Get the full file path of a file with the given id and an optional path prefix.

@param string $id
@param string $pathPrefix

@return string
178021
protected function getFilepath($id, $pathPrefix = null)
	{
		if ($pathPrefix === null)
		{
			$pathPrefix = $this->uploadPath;
		}
		else
		{
			$pathPrefix = rtrim($pathPrefix, $this->pathTrimMask);
		}

		return $pathPrefix . '/' . $id;
	}
27883
public function getPrefixedPath(string $path = '') : string
  {
    return trim($this->parent ? 
      ($this->parent->getPrefixedPath($this->prefix ? $this->prefix . '/' . $path : $path)) :
      ($this->prefix ? $this->prefix . '/' . $path : $path), '/');
  }
52789
protected function getDirectory($id)
    {
        $hash = sha1($id, false);
        $dirs = array(
            $this->getCacheDirectory(),
            substr($hash, 0, 2),
            substr($hash, 2, 2)
        );
        return join(DIRECTORY_SEPARATOR, $dirs);
    }
375186
protected function removePathPrefix($path, $prefix)
    {
        if ($prefix !== '/' && mb_stripos($path, $prefix) === 0) {
            $path = mb_substr($path, mb_strlen($prefix));
        }

        return $path;
    }
303171
protected function getFullViewsPath($viewsDirectory, $routesPrefix)
    {
        $path = !empty($routesPrefix) ? Helpers::getPathWithSlash(str_replace('.', '-', $routesPrefix)) : '';

        if (!empty($viewsDirectory)) {
            $path .= Helpers::getPathWithSlash($viewsDirectory);
        }

        return $path;
    }
705801
public function definePath($id, $title, $extension, $prefix = '', $suffix = '')
    {
        $path = '';

        if ($suffix) {
            $path = sprintf(
                '%s/%s-%s%s-%s.%s',
                $this->getCurrentDirectory(),
                (new \DateTime())->format('His'),
                $prefix,
                Canonicalizer::slug($title),
                $suffix,
                $extension
            );
        } else {
            $path = sprintf(
                '%s/%s-%s%s.%s',
                $this->getCurrentDirectory(),
                (new \DateTime())->format('His'),
                $prefix,
                Canonicalizer::slug($title),
                $extension
            );
        }

        if (file_exists(sprintf('%s/%s', $this->rootDir, $path))) {
            return $this->definePath($id, $title, $extension, $prefix, intval($suffix) + 1);
        }

        return $path;
    }
988427
public function loadTemplate($id, $extension = 'proc')
    {
        $path = $this->locator->locate(sprintf('%s.%s', $id, $extension));

        return $this->loadFile($path);
    }
824080
public function getRecord($id, $metadataPrefix)
    {
        $params = array(
            'identifier'     => $id,
            'metadataPrefix' => $metadataPrefix
        );

        return $this->client->request('GetRecord', $params);
    }
670015
public function addPrefixPath($prefix, $path)
    {
        if (!is_string($prefix) || !is_string($path)) {

            throw new Zend_Loader_PluginLoader_Exception('Zend_Loader_PluginLoader::addPrefixPath() method only takes strings for prefix and path.');
        }

        $prefix = $this->_formatPrefix($prefix);
        $path   = rtrim($path, '/\\') . '/';

        if ($this->_useStaticRegistry) {
            self::$_staticPrefixToPaths[$this->_useStaticRegistry][$prefix][] = $path;
        } else {
            if (!isset($this->_prefixToPaths[$prefix])) {
                $this->_prefixToPaths[$prefix] = array();
            }
            if (!in_array($path, $this->_prefixToPaths[$prefix])) {
                $this->_prefixToPaths[$prefix][] = $path;
            }
        }
        return $this;
    }
257634
public function registerFromPath($id, $path){
		if( !file_exists($path) ){
			return false;
		}
		$dom = $this->parser->parseFromString(file_get_contents($path));
		if( $dom ){
			$this->doms[$id] = $dom;
		}
		return false;
	}
112867
public function getPath($id, $file = null)
    {
        if (is_null($file)) {
            return sprintf('%s/%s/', $this->baseDir, $id);
        } else {
            return sprintf('%s/%s/%s', $this->baseDir, $id, $file);
        }
    }
147510
public String getFullPath(String path) {

		if (StringUtils.isEmpty(pathPrefix)) {
			return path;
		}

		return PathNormalizer.asPath(pathPrefix + path);
	}
1337612
protected static function _nestedResourceUrl($id, $nestedPath, $nestedId = null)
    {
        $url = static::resourceUrl($id) . $nestedPath;
        if ($nestedId !== null) {
            $url .= "/$nestedId";
        }
        return $url;
    }
525079
public function getPluginPath($id)
    {
        $classId = $this->getIdentifier($id);
        if (!isset($this->pathMap[$classId])) {
            return null;
        }

        return File::normalizePath($this->pathMap[$classId]);
    }
387128
public static function addPrefixToFile($path, $prefix = null)
    {
        if ($prefix === null || $prefix == '') {
            return $path;
        }

        $path = str_replace('\\', '/', $path);
        $dir = explode('/', $path);
        $lastIndex = count($dir) - 1;
        $dir[$lastIndex] = $prefix . $dir[$lastIndex];

        return implode('/', $dir);
    }
451184
public function findById($id)
    {
        if(!file_exists($path = $this->getPathForDocument($id))) {
            return false;
        }

        $fp       = fopen($path, 'r');
        $contents = fread($fp, filesize($path));
        fclose($fp);

        $data = $this->formatter->decode($contents);

        if($data === null) {
            return false;
        }

        $ext = $this->formatter->getFileExtension();

        $doc = new $this->documentClass((array) $data);
        $doc->setId($this->getIdFromPath($path, $ext));

        return $doc;
    }
1102189
private function getFullPath($type, $path)
    {
        return sprintf('%s/%s/%s', $this->config['web_root_dir'], $this->config[$type . '_path'], $path);
    }