Skip to main content

LtTorrentFlags

Manages flags for a torrent. Internally it wraps libtorrent::torrent_flags_t which is a bitfield, and this wrapper makes it easier to work with.

See the libtorrent docs on flags.

Example

local flags = LtTorrentFlags()

if flags:has("default_dont_download") then
flags:clear("default_dont_download")
end

Methods

clear(flag: string): void

v1.0

Clears a flag by its name.

has(flag: string): boolean

v1.0

Returns true if the flag is set.

set(flag: string): void

v1.0

Sets the flag.