code: public static String getPathToChild(Resource file, Resource dir) {
  	if (dir == null || !file.getResourceProvider().getScheme().equals(dir.getResourceProvider().getScheme())) return null;
  	boolean isFile = file.isFile();
  	String str = "/";
  	while (file != null) {
  	    if (file.equals(dir)) {
  		if (isFile) return str.substring(0, str.length() - 1);
  		return str;
  	    }
  	    str = "/" + file.getName() + str;
  	    file = file.getParentResource();
  	}
  	return null;
      }
docs: return diffrents of one file to a other if first is child of second otherwise return null
  
  @param file file to search
  @param dir directory to search