Class: QuartzTorrent::Metainfo::FileInfo

Inherits:
Object
  • Object
show all
Defined in:
lib/quartz_flow/mock_client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(length = nil, path = nil) ⇒ FileInfo



31
32
33
34
# File 'lib/quartz_flow/mock_client.rb', line 31

def initialize(length = nil, path = nil)
  @length = length
  @path = path
end

Instance Attribute Details

#lengthObject

Length of the file.



40
41
42
# File 'lib/quartz_flow/mock_client.rb', line 40

def length
  @length
end

#pathObject

Relative path to the file. For a single-file torrent this is simply the name of the file. For a multi-file torrent, this is the directory names from the torrent and the filename separated by the file separator.



38
39
40
# File 'lib/quartz_flow/mock_client.rb', line 38

def path
  @path
end