use of com.frostwire.jlibtorrent.FileStorage in project frostwire by frostwire.
the class TorrentFetcherDownload method calculateSelection.
private boolean[] calculateSelection(TorrentInfo ti, String path) {
boolean[] selection = new boolean[ti.numFiles()];
FileStorage fs = ti.files();
for (int i = 0; i < selection.length; i++) {
String filePath = fs.filePath(i);
if (path.endsWith(filePath) || filePath.endsWith(path)) {
selection[i] = true;
}
}
return selection;
}
Aggregations