Class: TD::Types::RemoteFile

Inherits:
Base
  • Object
show all
Defined in:
lib/tdlib/types/remote_file.rb

Overview

Represents a remote file.

Instance Attribute Summary collapse

Method Summary

Methods inherited from Base

#to_hash, #to_json

Instance Attribute Details

#idTD::Types::String?

Remote file identifier; may be empty. Can be used by the current user across application restarts or even from other devices. Uniquely identifies a file, but a file can have a lot of different valid identifiers. If the ID starts with “http://” or “https://”, it represents the HTTP URL of the file. TDLib is currently unable to download files if only their URL is known. If downloadFile is called on such a file or if it is sent to a secret chat, TDLib starts a file generation process by sending Update::FileGenerationStart to the application with the HTTP URL in the original_path and “#url#” as the conversion string. Application should generate the file by downloading it to the specified location.

Returns:

  • (TD::Types::String, nil)

    the current value of id



20
21
22
# File 'lib/tdlib/types/remote_file.rb', line 20

def id
  @id
end

#is_uploading_activeBoolean

True, if the file is currently being uploaded (or a remote copy is being generated by some other means).

Returns:

  • (Boolean)

    the current value of is_uploading_active



20
21
22
# File 'lib/tdlib/types/remote_file.rb', line 20

def is_uploading_active
  @is_uploading_active
end

#is_uploading_completedBoolean

True, if a remote copy is fully available.

Returns:

  • (Boolean)

    the current value of is_uploading_completed



20
21
22
# File 'lib/tdlib/types/remote_file.rb', line 20

def is_uploading_completed
  @is_uploading_completed
end

#unique_idTD::Types::String?

Unique file identifier; may be empty if unknown. The unique file identifier which is the same for the same file even for different users and is persistent over time.

Returns:

  • (TD::Types::String, nil)

    the current value of unique_id



20
21
22
# File 'lib/tdlib/types/remote_file.rb', line 20

def unique_id
  @unique_id
end

#uploaded_sizeInteger

Size of the remote available part of the file; 0 if unknown.

Returns:

  • (Integer)

    the current value of uploaded_size



20
21
22
# File 'lib/tdlib/types/remote_file.rb', line 20

def uploaded_size
  @uploaded_size
end