module/Core/src/Grid/Core/Model/FileSystem.php
protected function realPath( $path )
    {
        $path = trim( str_replace( '\\', '/', $path ), '/' );
        $path = str_replace( '/./', '/', $path );
        $path = preg_replace( '#[^/]+/\\.\\./#', '/', $path );
        $path = preg_replace( '#/?\\.\\.?/#', '', $path );
        $path = preg_replace( '#/+#', '/', $path );
        $path = trim( $path, '/' );

        if ( $path == '.' || $path == '..' )
        {
            $path = '';
        }

        return $path;
    }
protected function realPath( $path )
    {
        $path = trim( str_replace( '\\', '/', $path ), '/' );
        $path = str_replace( '/./', '/', $path );
        $path = preg_replace( '#[^/]+/\\.\\./#', '/', $path );
        $path = preg_replace( '#/?\\.\\.?/#', '', $path );
        $path = preg_replace( '#/+#', '/', $path );
        $path = trim( $path, '/' );

        if ( $path == '.' || $path == '..' )
        {
            $path = '';
        }

        return $path;
    }
protected function realPath ( $ path ) { $ path = trim ( str_replace ( '\\' , '/' , $ path ) , '/' ) ; $ path = str_replace ( '/./' , '/' , $ path ) ; $ path = preg_replace ( '#[^/]+/\\.\\./#' , '/' , $ path ) ; $ path = preg_replace ( '#/?\\.\\.?/#' , '' , $ path ) ; $ path = preg_replace ( '#/+#' , '/' , $ path ) ; $ path = trim ( $ path , '/' ) ; if ( $ path == '.' || $ path == '..' ) { $ path = '' ; } return $ path ; }
Get real path

@param string $path
@return string
Get real path