Cake\Console\Shell::shortPath PHP Method

shortPath() public method

Makes absolute file path easier to read
public shortPath ( string $file ) : string
$file string Absolute file path
return string short path
    public function shortPath($file)
    {
        $shortPath = str_replace(ROOT, null, $file);
        $shortPath = str_replace('..' . DIRECTORY_SEPARATOR, '', $shortPath);
        $shortPath = str_replace(DIRECTORY_SEPARATOR, '/', $shortPath);
        return str_replace('//', DIRECTORY_SEPARATOR, $shortPath);
    }