@Deprecated
  @CheckForNull
  public RelativePath relativePath(Collection<File> dirs, File file) {
    List<String> stack = new ArrayList<>();
    File cursor = file;
    while (cursor != null) {
      File parentDir = parentDir(dirs, cursor);
      if (parentDir != null) {
        return new RelativePath(parentDir, stack.stream().collect(joining("/")));
      }
      stack.add(0, cursor.getName());
      cursor = cursor.getParentFile();
    }
    return null;
  }
@ Deprecated @ CheckForNull public RelativePath relativePath ( Collection < File > dirs , File file ) { List < String > stack = new ArrayList < > ( ) ; File cursor = file ; while ( cursor != null ) { File parentDir = parentDir ( dirs , cursor ) ; if ( parentDir != null ) { return new RelativePath ( parentDir , stack . stream ( ) . collect ( joining ( "/" ) ) ) ; } stack . add ( 0 , cursor . getName ( ) ) ; cursor = cursor . getParentFile ( ) ; } return null ; }
@deprecated since 6.0 was used when component keys were relative to source dirs