struct

QBittorrent::Model::TorrentFile

Inherits JSON::Serializable < Struct < Value < Object

A file within a torrent, as returned by torrents/files (see ext/api-map.md ยง3).

priority decodes through the tolerant FilePriorityConverter, so the legacy/unused values 2โ€“5 (and any unknown/null) become nil instead of raising. is_seed is only present on the first element of the list. Fields are nilable to tolerate partial payloads and build drift.

Constructors

new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

availability

Fractional availability of this file's pieces.

Source
index

File index within the torrent (qB 5.x).

Source
is_seed

Whether this file is fully downloaded/seeded (only present on the first list element).

Source
name

File name (path relative to the torrent root).

Source
piece_range

Inclusive [start, end] range of piece indexes covering this file.

Source
priority

Download priority. Decoded tolerantly (unknown/legacy 2โ€“5/null => nil).

Source
progress

Download progress for this file, 0.0โ€“1.0.

Source
size

File size in bytes.

Source