code: private static String getParent(Resource res) {
  	Resource parent = res.getParentResource();
  	// print.out("res:"+res);
  	// print.out("parent:"+parent);
  	if (parent == null) return "";
  	return ResourceUtil.getCanonicalPathEL(parent);
      }
docs: /*
  private String correctDirectory(Resource resource) { if(StringUtil.isEmpty(resource,true)) return
  ""; resource=resource.trim(); if((StringUtil.endsWith(resource, '/') ||
  StringUtil.endsWith(resource, '\\')) && resource.length()>1) { return
  resource.substring(0,resource.length()-1); } return resource; }