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.



16
17
18
# File 'lib/tdlib/types/local_file.rb', line 16

def can_be_deleted
  @can_be_deleted
end

#can_be_downloadedBoolean

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



16
17
18
# File 'lib/tdlib/types/local_file.rb', line 16

def can_be_downloaded
  @can_be_downloaded
end

#downloaded_prefix_sizeInteger

If is_downloading_completed is false, then only some prefix of the file is ready to be read. downloaded_prefix_size is the size of that prefix.



16
17
18
# File 'lib/tdlib/types/local_file.rb', line 16

def downloaded_prefix_size
  @downloaded_prefix_size
end

#downloaded_sizeInteger

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.



16
17
18
# File 'lib/tdlib/types/local_file.rb', line 16

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).



16
17
18
# File 'lib/tdlib/types/local_file.rb', line 16

def is_downloading_active
  @is_downloading_active
end

#is_downloading_completedBoolean

True, if the local copy is fully available.



16
17
18
# File 'lib/tdlib/types/local_file.rb', line 16

def is_downloading_completed
  @is_downloading_completed
end

#pathString?

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



16
17
18
# File 'lib/tdlib/types/local_file.rb', line 16

def path
  @path
end