Class: TD::Types::LocalFile
- Defined in:
- lib/tdlib/types/local_file.rb
Overview
Represents a local file.
Instance Attribute Summary collapse
-
#can_be_deleted ⇒ Boolean
True, if the file can be deleted.
-
#can_be_downloaded ⇒ Boolean
True, if it is possible to try to download or generate the file.
-
#downloaded_prefix_size ⇒ Integer
If is_downloading_completed is false, then only some prefix of the file is ready to be read.
-
#downloaded_size ⇒ Integer
Total downloaded file bytes.
-
#is_downloading_active ⇒ Boolean
True, if the file is currently being downloaded (or a local copy is being generated by some other means).
-
#is_downloading_completed ⇒ Boolean
True, if the local copy is fully available.
-
#path ⇒ String?
Local path to the locally available file part; may be empty.
Method Summary
Methods inherited from Base
Instance Attribute Details
#can_be_deleted ⇒ Boolean
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_downloaded ⇒ Boolean
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_size ⇒ Integer
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_size ⇒ Integer
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_active ⇒ Boolean
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_completed ⇒ Boolean
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 |
#path ⇒ String?
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 |