Class: Zip::ZipFileSystem::ZipFsDirIterator
Instance Method Summary
collapse
Methods included from Enumerable
#deep_clone, #deep_dup, #inject, #select_map
Constructor Details
Returns a new instance of ZipFsDirIterator.
447
448
449
450
|
# File 'lib/zip/zipfilesystem.rb', line 447
def initialize(arrayOfFileNames)
@fileNames = arrayOfFileNames
@index = 0
end
|
Instance Method Details
452
453
454
|
# File 'lib/zip/zipfilesystem.rb', line 452
def close
@fileNames = nil
end
|
#each(&aProc) ⇒ Object
456
457
458
459
|
# File 'lib/zip/zipfilesystem.rb', line 456
def each(&aProc)
raise IOError, "closed directory" if @fileNames == nil
@fileNames.each(&aProc)
end
|
461
462
463
464
|
# File 'lib/zip/zipfilesystem.rb', line 461
def read
raise IOError, "closed directory" if @fileNames == nil
@fileNames[(@index+=1)-1]
end
|
466
467
468
469
|
# File 'lib/zip/zipfilesystem.rb', line 466
def rewind
raise IOError, "closed directory" if @fileNames == nil
@index = 0
end
|
#seek(anIntegerPosition) ⇒ Object
471
472
473
474
|
# File 'lib/zip/zipfilesystem.rb', line 471
def seek(anIntegerPosition)
raise IOError, "closed directory" if @fileNames == nil
@index = anIntegerPosition
end
|
476
477
478
479
|
# File 'lib/zip/zipfilesystem.rb', line 476
def tell
raise IOError, "closed directory" if @fileNames == nil
@index
end
|