use of com.turn.ttorrent.common.Torrent in project teamcity-torrent-plugin by JetBrains.
the class TorrentsSeederTest method createTorrentFromFile.
private File createTorrentFromFile(File srcFile, File torrentDir) throws InterruptedException, NoSuchAlgorithmException, IOException {
File torrentFile = new File(torrentDir, srcFile.getName() + ".torrent");
final Torrent torrent = TorrentCreator.create(srcFile, myTracker.getAnnounceURI(), "Test");
TorrentUtil.saveTorrentToFile(torrent, torrentFile);
return torrentFile;
}
Aggregations