code: protected String getDirectoryPath(File directory, File entry) {
          String relativePath;
          if (entry.equals(directory)) {
              relativePath = "/";
          } else {
              String filePath = entry.getAbsolutePath();
              String directoryPath = directory.getAbsolutePath();
              relativePath = filePath.substring(directoryPath.length()).replace(File.separator, "/");
          }
          return relativePath;
      }
docs: Return the relative path of a file within a directory.
  
  @param directory
  The directory.
  @param entry
  The file.
  @return The relative path.