code: public MetadataBuilder addFile(@NotNull File source, @NotNull String path) {
      if (!source.isFile()) {
        throw new IllegalArgumentException(source + " is not exist");
      }
      checkHashingResultIsNotSet();
      filesPaths.add(path);
      dataSources.add(new FileSourceHolder(source));
      return this;
    }
docs: add specified file in torrent with custom path. The file will be stored in .torrent
  by specified path. Path can be separated with any slash. In case of single-file torrent
  this path will be used as name of source file