code: public static String[] translatePathName(String path) {
  	path = prettifyPath(path);
  	if (path.indexOf('/') != 0) path = '/' + path;
  	int index = path.lastIndexOf('/');
  	// remove slash at the end
  	if (index == path.length() - 1) path = path.substring(0, path.length() - 1);
  
  	index = path.lastIndexOf('/');
  	String name;
  	if (index == -1) {
  	    name = path;
  	    path = "/";
  	}
  	else {
  	    name = path.substring(index + 1);
  	    path = path.substring(0, index + 1);
  	}
  	return new String[] { path, name };
      }
docs: translate a path in a proper form and cut name away example susi\petere -> /susi/ and peter
  
  @param path
  @return