Class: TD::Types::LocalFile

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

Overview

Represents a local file.

Instance Attribute Summary collapse

Method Summary

Methods inherited from Base

#to_hash, #to_json

Instance Attribute Details

#can_be_deletedBoolean

True, if the file can be deleted.

Returns:

  • (Boolean)

    the current value of can_be_deleted



18
19
20
# File 'lib/tdlib/types/local_file.rb', line 18

def can_be_deleted
  @can_be_deleted
end

#can_be_downloadedBoolean

True, if it is possible to download or generate the file.

Returns:

  • (Boolean)

    the current value of can_be_downloaded



18
19
20
# File 'lib/tdlib/types/local_file.rb', line 18

def can_be_downloaded
  @can_be_downloaded
end

#download_offsetInteger

Download will be started from this offset. downloaded_prefix_size is calculated from this offset.

Returns:

  • (Integer)

    the current value of download_offset



18
19
20
# File 'lib/tdlib/types/local_file.rb', line 18

def download_offset
  @download_offset
end

#downloaded_prefix_sizeInteger

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 in bytes.

Returns:

  • (Integer)

    the current value of downloaded_prefix_size



18
19
20
# File 'lib/tdlib/types/local_file.rb', line 18

def downloaded_prefix_size
  @downloaded_prefix_size
end

#downloaded_sizeInteger

Total downloaded file size, in bytes. Can be used only for calculating download progress. The actual file size may be bigger, and some parts of it may contain garbage.

Returns:

  • (Integer)

    the current value of downloaded_size



18
19
20
# File 'lib/tdlib/types/local_file.rb', line 18

def downloaded_size
  @downloaded_size
end

#is_downloading_activeBoolean

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

Returns:

  • (Boolean)

    the current value of is_downloading_active



18
19
20
# File 'lib/tdlib/types/local_file.rb', line 18

def is_downloading_active
  @is_downloading_active
end

#is_downloading_completedBoolean

True, if the local copy is fully available.

Returns:

  • (Boolean)

    the current value of is_downloading_completed



18
19
20
# File 'lib/tdlib/types/local_file.rb', line 18

def is_downloading_completed
  @is_downloading_completed
end

#pathTD::Types::String?

Local path to the locally available file part; may be empty.

Returns:

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

    the current value of path



18
19
20
# File 'lib/tdlib/types/local_file.rb', line 18

def path
  @path
end