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.
-
#download_offset ⇒ Integer
Download will be started from this offset.
-
#downloaded_prefix_size ⇒ Integer
If is_downloading_completed is false, then only some prefix of the file starting from download_offset 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 ⇒ TD::Types::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.
18 19 20 |
# File 'lib/tdlib/types/local_file.rb', line 18 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.
18 19 20 |
# File 'lib/tdlib/types/local_file.rb', line 18 def can_be_downloaded @can_be_downloaded end |
#download_offset ⇒ Integer
Download will be started from this offset. downloaded_prefix_size is calculated from this offset.
18 19 20 |
# File 'lib/tdlib/types/local_file.rb', line 18 def download_offset @download_offset end |
#downloaded_prefix_size ⇒ Integer
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.
18 19 20 |
# File 'lib/tdlib/types/local_file.rb', line 18 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.
18 19 20 |
# File 'lib/tdlib/types/local_file.rb', line 18 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).
18 19 20 |
# File 'lib/tdlib/types/local_file.rb', line 18 def is_downloading_active @is_downloading_active end |
#is_downloading_completed ⇒ Boolean
True, if the local copy is fully available.
18 19 20 |
# File 'lib/tdlib/types/local_file.rb', line 18 def is_downloading_completed @is_downloading_completed end |
#path ⇒ TD::Types::String?
Local path to the locally available file part; may be empty.
18 19 20 |
# File 'lib/tdlib/types/local_file.rb', line 18 def path @path end |