public static String parentPath ( String p ) { if ( p == null || URIUtils . SLASH . equals ( p ) ) return null ; int slash = p . lastIndexOf ( ' ' , p . length ( ) - 2 ) ; if ( slash >= 0 ) return p . substring ( 0 , slash + 1 ) ; return null ; }
Return the parent Path . Treat a URI like a directory path and return the parent directory .