private static String pathRemoveLast(String path,RefBoolean isOutSide){
  if (path.length() == 0) {
    isOutSide.setValue(true);
    return "..";
  }
 else   if (path.endsWith("..")) {
    isOutSide.setValue(true);
    return path.concat("/..");
  }
  return path.substring(0,path.lastIndexOf('/'));
}

private static String pathRemoveLast ( String path , RefBoolean isOutSide ) { if ( path . length ( ) == 0 ) { isOutSide . setValue ( true ) ; return ".." ; } else if ( path . endsWith ( ".." ) ) { isOutSide . setValue ( true ) ; return path . concat ( "/.." ) ; } return path . substring ( 0 , path . lastIndexOf ( '/' ) ) ; }
remove the last elemtn of a path
