Generate directory path to be used for the file pretty name.

@return string
552188
protected function getDirectoryPrettyName()
    {
        $fileBaseName = $this->getFileName();

        $fileRelativePath = $this->normalizePath($this->file->getRelativePath());

        if (in_array($this->file->getExtension(), ['php', 'md']) && $fileBaseName != 'index') {
            $fileRelativePath .= $fileRelativePath ? "/$fileBaseName" : $fileBaseName;
        }

        return KATANA_PUBLIC_DIR.($fileRelativePath ? "/$fileRelativePath" : '');
    }
1243127
public function getPath(): string
    {
        if (!$this->path) {
            if (\defined('PATH_APPLICATION')) {
                $this->path = PATH_APPLICATION;
            } else {
                $reflection = new \ReflectionClass($this);
                // 3 level up
                $this->path = \dirname($reflection->getFileName(), 3);
            }
        }
        return $this->path;
    }
150255
public function getFilepath()
    {
        if (isset($this->dirPath)) {
            $filepath = $this->dirPath .'/'.$this->filename;
        } else {
            $fileSystem = $this->createNew(FileSystem::class);
            $filepath   = $fileSystem->getCurrentWorkingDirectory() .'/'.$this->filename;    
        }
        return $filepath;        
    }
511715
public function getStoragePath()
    {
        $path = $this->getOption('storage_path');
        $path = $path ? $path : storage_path().'/administrator_settings/';

        return rtrim($path, '/').'/';
    }
1021355
public function getModulePath(): string
    {
        $reflector = new ReflectionClass(get_class($this));
        $fn = $reflector->getFileName();
        $directory = dirname($fn);
        return $directory;
    }
997041
public function getTargetDirectory(): string
    {
        $directoryName = $this->getRootRelatedPath($this->getFactorySpecificConfig()['directory']);

        $this->assertDirectoryIsWriteable($directoryName);

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

        return $this->path;
    }
147122
public function getDirectory()
    {
        if (!isset($this->directory)) {
            $this->setDirectory($this->getPHPCI()->buildPath);
        }
        return $this->directory;
    }
710767
public function getPath() : string
    {
        if ($this->fullPath !== null) {
            return $this->fullPath;
        }

        $path = $this->getSetting('path');

        if (is_dir($path)) {
            $this->verified = true;

            return $this->fullPath = realpath($path);
        }

        $pubPath = public_path(trim($path, '/'));

        $this->verified = is_dir($pubPath);

        return $this->fullPath = $pubPath;
    }
892507
protected function getPath(): string
    {
        $directory = config('menus.directory');

        if (! $directory) {
            throw new DirectoryNotFound('Directory with menu files does not exist.');
        }

        $path = $this->file->exists(base_path($directory)) ? base_path($directory) : __DIR__ . '/../resources/menus';

        return $path;
    }
1319068
protected function prepareBasePath()
    {
        $baseUrl = $this->getBaseUrl();
        if (empty($baseUrl)) {
            return '';
        }

        $filename = basename($this->server->get('SCRIPT_FILENAME'));
        if (basename($baseUrl) === $filename) {
            $basePath = \dirname($baseUrl);
        } else {
            $basePath = $baseUrl;
        }

        if ('\\' === \DIRECTORY_SEPARATOR) {
            $basePath = str_replace('\\', '/', $basePath);
        }

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

        return $path;
    }
222700
public function full_file_root_path()
    {
        $subDirs = implode('/', $this->subDirs);
        if ($subDirs) {
            $subDirs .= '/';
        }
        return $this->baseDir . '/' . $subDirs . $this->fileRoot;
    }
534449
public function getName()
    {
        $name = rtrim($this->path, '/');

        if (strstr($name, DIRECTORY_SEPARATOR)) {
            $name = substr($name, strrpos($name, DIRECTORY_SEPARATOR) + 1);
        }

        return trim($name);
    }
569294
public function getSortorderPath()
    {
        $fileName = $this->path . DIRECTORY_SEPARATOR . '.sortorder';
        if(file_exists($fileName))
        {
            return $fileName;
        }
        $fileName = $this->path . DIRECTORY_SEPARATOR . '_sortorder';
        if(file_exists($fileName))
        {
            return $fileName;
        }

        return false;
    }
63361
private function generateFilename()
    {
        if ($this->filename) {
            return $this->filename;
        }

        if ($this->hash_filename) {
            return $this->generateHash();
        }

        return $this->sanitizeFileName($this->source->filename());
    }
482735
public function getFileDisplayName()
    {
        $base = str_replace(DIRECTORY_SEPARATOR, '/', DIR_BASE);
        if (strpos($this->filename, $base) === 0) {
            $path = substr($this->filename, strlen($base) + 1);
        } else {
            $path = $this->filename;
        }

        return str_replace('/', DIRECTORY_SEPARATOR, $path);
    }