public static function slashDirname($dirname = null)
    {
        if (is_null($dirname) || empty($dirname)) {
            return '';
        }
        return rtrim($dirname, '/ '.DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR;
    }
public static function slashDirname($dirname = null)
    {
        if (is_null($dirname) || empty($dirname)) {
            return '';
        }
        return rtrim($dirname, '/ '.DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR;
    }
public static function slashDirname ( $ dirname = null ) { if ( is_null ( $ dirname ) || empty ( $ dirname ) ) { return '' ; } return rtrim ( $ dirname , '/ ' . DIRECTORY_SEPARATOR ) . DIRECTORY_SEPARATOR ; }
Get a dirname with one and only trailing slash

@param   string  $dirname
@return  string
Get a dirname with one and only trailing slash