Sha256: b44029ceeb28b1d7cd1d7e3d3199a8ab2b6c93b284a97b869a2372052d0ff3e7

Contents?: true

Size: 1.6 KB

Versions: 2

Compression:

Stored size: 1.6 KB

Contents

module TD::Types
  # Represents a local file.
  #
  # @attr path [TD::Types::String, nil] Local path to the locally available file part; may be empty.
  # @attr can_be_downloaded [Boolean] True, if it is possible to try to download or generate the file.
  # @attr can_be_deleted [Boolean] True, if the file can be deleted.
  # @attr is_downloading_active [Boolean] True, if the file is currently being downloaded (or a local copy is being
  #   generated by some other means).
  # @attr is_downloading_completed [Boolean] True, if the local copy is fully available.
  # @attr download_offset [Integer] Download will be started from this offset.
  #   downloaded_prefix_size is calculated from this offset.
  # @attr downloaded_prefix_size [Integer] If is_downloading_completed is false, then only some prefix of the file
  #   starting from download_offset is ready to be read.
  #   downloaded_prefix_size is the size of that prefix.
  # @attr downloaded_size [Integer] Total downloaded file bytes.
  #   Should be used only for calculating download progress.
  #   The actual file size may be bigger, and some parts of it may contain garbage.
  class LocalFile < Base
    attribute :path, TD::Types::String.optional.default(nil)
    attribute :can_be_downloaded, TD::Types::Bool
    attribute :can_be_deleted, TD::Types::Bool
    attribute :is_downloading_active, TD::Types::Bool
    attribute :is_downloading_completed, TD::Types::Bool
    attribute :download_offset, TD::Types::Coercible::Integer
    attribute :downloaded_prefix_size, TD::Types::Coercible::Integer
    attribute :downloaded_size, TD::Types::Coercible::Integer
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
tdlib-schema-1.7.0.3 lib/tdlib/types/local_file.rb
tdlib-schema-1.7.0.2 lib/tdlib/types/local_file.rb