private function getShortPath($filename)
    {
        if (getcwd() === dirname($filename)) {
            return basename($filename);
        }
        $homeDir = Filesystem::getHomeDirectory();
        if (strpos($filename, $homeDir) === 0) {
            return str_replace($homeDir, '~', $filename);
        }

        return $filename;
    }
private function getShortPath($filename)
    {
        if (getcwd() === dirname($filename)) {
            return basename($filename);
        }
        $homeDir = Filesystem::getHomeDirectory();
        if (strpos($filename, $homeDir) === 0) {
            return str_replace($homeDir, '~', $filename);
        }

        return $filename;
    }
private function getShortPath ( $ filename ) { if ( getcwd ( ) === dirname ( $ filename ) ) { return basename ( $ filename ) ; } $ homeDir = Filesystem :: getHomeDirectory ( ) ; if ( strpos ( $ filename , $ homeDir ) === 0 ) { return str_replace ( $ homeDir , '~' , $ filename ) ; } return $ filename ; }
Shorten a filename for display.

@param string $filename

@return string
Shorten a filename for display .