Class: TD::Types::File

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

Overview

Represents a file.

Instance Attribute Summary collapse

Method Summary

Methods inherited from Base

#to_hash, #to_json

Instance Attribute Details

#expected_sizeInteger

Expected file size in case the exact file size is unknown, but an approximate size is known. Can be used to show download/upload progress.

Returns:

  • (Integer)

    the current value of expected_size



11
12
13
# File 'lib/tdlib/types/file.rb', line 11

def expected_size
  @expected_size
end

#idInteger

Unique file identifier.

Returns:

  • (Integer)

    the current value of id



11
12
13
# File 'lib/tdlib/types/file.rb', line 11

def id
  @id
end

#localTD::Types::LocalFile

Information about the local copy of the file.

Returns:



11
12
13
# File 'lib/tdlib/types/file.rb', line 11

def local
  @local
end

#remoteTD::Types::RemoteFile

Information about the remote copy of the file.

Returns:



11
12
13
# File 'lib/tdlib/types/file.rb', line 11

def remote
  @remote
end

#sizeInteger

File size; 0 if unknown.

Returns:

  • (Integer)

    the current value of size



11
12
13
# File 'lib/tdlib/types/file.rb', line 11

def size
  @size
end