Returns a relative path to the current block's directory. If a filename is specified it will be appended and searched for as well.

@return string
17178
public function getBlockURL($filename = null)
    {
        $obj = $this->blockType;
        if ($obj->getPackageID() > 0) {
            if (is_dir(DIR_PACKAGES_CORE . '/' . $obj->getPackageHandle())) {
                $base = ASSETS_URL . '/' . DIRNAME_PACKAGES . '/' . $obj->getPackageHandle(
                    ) . '/' . DIRNAME_BLOCKS . '/' . $obj->getBlockTypeHandle();
            } else {
                $base = DIR_REL . '/' . DIRNAME_PACKAGES . '/' . $obj->getPackageHandle(
                    ) . '/' . DIRNAME_BLOCKS . '/' . $obj->getBlockTypeHandle();
            }
        } else {
            if (file_exists(DIR_FILES_BLOCK_TYPES . '/' . $obj->getBlockTypeHandle() . '/' . $filename)) {
                $base = REL_DIR_APPLICATION . '/' . DIRNAME_BLOCKS . '/' . $obj->getBlockTypeHandle();
            } else {
                $base = ASSETS_URL . '/' . DIRNAME_BLOCKS . '/' . $obj->getBlockTypeHandle();
            }
        }

        return $base;
    }
923501
private function getDirectoryPath()
    {
        $path = $this->config['directory'];

        // Create directory if not exists
        if (!is_dir($path)) {
            mkdir($path, 0755, true);
        }

        return $path . DIRECTORY_SEPARATOR;
    }
794036
protected function getFilePath()
    {
        $path = $this->cachePath . DIRECTORY_SEPARATOR . $this->cacheDirectory . DIRECTORY_SEPARATOR;
        $path = str_replace(['\\\\', '//'], [DIRECTORY_SEPARATOR, DIRECTORY_SEPARATOR], $path);

        return $path;
    }
984724
public function getImageAbsolutePath()
    {
        if ($this->_imageAbsolutePath === null) {
            $this->_imageAbsolutePath = Yii::getAlias('@webroot') .
                '/' . (defined('IS_BACKEND') ? '../' : '') .
                ltrim($this->getImagePath(), '/');
            if (!file_exists($this->_imageAbsolutePath)) {
                yii\helpers\FileHelper::createDirectory($this->_imageAbsolutePath);
            }
        }
        return $this->_imageAbsolutePath;
    }
895914
public function getWebPath()
    {
        return (!empty($this->web_path) ? str_replace($this->getRootDir(), '', DirectoryHelper::slashDirname($this->web_path)) : '');
    }
703064
public function getAbsolutePath()
    {
        if (empty($this->mount) && is_null($this->path)) {
            return null;
        }

        if (empty($this->mount)) {
            return $this->path;
        }

        return $this->mount . "/" . $this->path;
    }
902136
public function getPath()
    {
        if ($this->file !== null) {
            return $this->file->getForLocalProcessing(false);
        } else {
            return $this->fileInfo['path'];
        }
    }
78639
private function getFilePath()
    {
        $fullname = $this->fullName;
        $rootPath = Yii::getAlias('@webroot');

        if (substr($fullname, 0, 1) != '/') {
            $fullname = '/' . $fullname;
        }

        return $rootPath . $fullname;
    }
438691
public function getBuildPath()
    {
        $path = pathinfo($this->relativePath);

        $fingerprint = md5($this->filters->map(function($f) { return $f->getFilter(); })->toJson().$this->getLastModified());

        return "{$path['dirname']}/{$path['filename']}-{$fingerprint}.{$this->getBuildExtension()}";
    }
75804
public static function path($filename, $relativeTo = null, $checkExists = true, $ds = null)
    {
        $ds = $ds ?: DIRECTORY_SEPARATOR;

        if (is_array($filename)) {
            $pathnames = array();
            foreach ($filename as $k => $f) {
                $pathnames[$k] = self::path($f, $relativeTo, $checkExists);
            }
            return $pathnames;
        }

        $relativeTo = $relativeTo ?: self::$rootDirectory;
        $pathname = $filename;
        if ($filename{0} != '/' && !preg_match('#^[A-Z]:(\\\\|/)#', $filename)) {
            if (strlen($filename) >= 2 && substr($filename, 0, 2) == './') {
                $filename = substr($filename, 2);
            }
            $pathname = rtrim($relativeTo, $ds) . $ds . $filename;
        }
        if ($checkExists) {
            return realpath($pathname);
        }
        return $pathname;
    }
1056914
public function getRelativePathToCurrentDirectoryParent()
    {
        if ($this->baseDir === $this->currentDir) {
            return DIRECTORY_SEPARATOR;
        }

        $path = realpath($this->currentDir . DIRECTORY_SEPARATOR . '..');

        return $this->getPathRelativeToBaseDir($path) ?: DIRECTORY_SEPARATOR;
    }
908390
public function pwd()
    {
        if ($this->path === null) {
            $this->path = $this->Folder->slashTerm($this->Folder->pwd()) . $this->name;
        }

        return $this->path;
    }
668752
public function getPath(): string
    {
        if (\count($this->segments) === 0) {
            return '/';
        }

        $path = sprintf('/%s/', implode('/', $this->segments));

        if (!$this->definition->hasSlash()) {
            $path = substr($path, 0, -1);
        }

        return $path;
    }
1144017
public static function getTemplatePath()
    {
        $path = \Phar::running();

    	if (!empty($path)) {
    		return $path . DIRECTORY_SEPARATOR . 'bin' . DIRECTORY_SEPARATOR . '.files';
    	}

    	$root = dirname(dirname(dirname(dirname(__DIR__))));

    	return realpath($root .DIRECTORY_SEPARATOR . 'bin' . DIRECTORY_SEPARATOR . '.files');
    }
329933
private function getFilePath()
    {

        $tmpDir = realpath($this->getContainer()->get('kernel')->getRootDir() . '/../var/tmp/');
        $fileName = '/' . str_replace(':', '--', $this->getName()) . '.sock';

        if (!file_exists($tmpDir)) {
            mkdir($tmpDir);
        }

        return $tmpDir . $fileName;
    }
350358
public function getDirOutput() {
        $ds = DIRECTORY_SEPARATOR;
        $id = $this->getId();
        $documentsPath = $this->exporterManager->getOption("documents_path");
        $env = $this->exporterManager->getOption("env");
        if($this->basePath === null){
            $fullPath = $documentsPath.$ds.$env.$ds.$id;
        }else{
            $fullPath = $this->basePath;
        }
        if($this->subPath !== null){
            $fullPath .= $ds.$this->subPath;
        }
        
        if(!$this->exporterManager->getFs()->exists($fullPath)){
            $this->exporterManager->getFs()->mkdir($fullPath);
        }
        return $fullPath;
    }
353055
public function getRelativePath()
    {
        $root = $this;
        while ($root->getParent() != null) {
            $root = $root->getParent();
        }

        return substr($this->path, strlen($root->getPath()) + 1);
    }