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

Approximate file size in bytes in case the exact file size is unknown. Can be used to show download/upload progress.

Returns:

  • (Integer)

    the current value of expected_size



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

def expected_size
  @expected_size
end

#idInteger

Unique file identifier.

Returns:

  • (Integer)

    the current value of id



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

def id
  @id
end

#localTD::Types::LocalFile

Information about the local copy of the file.

Returns:



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

def local
  @local
end

#remoteTD::Types::RemoteFile

Information about the remote copy of the file.

Returns:



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

def remote
  @remote
end

#sizeInteger

File size, in bytes; 0 if unknown.

Returns:

  • (Integer)

    the current value of size



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

def size
  @size
end