# File lib/rex/image_source/disk.rb, line 53 def close file.close end
# File lib/rex/image_source/disk.rb, line 33 def index(search, offset = 0) # do a sliding window search across the disk while offset < size # get a full window size if we can, we # don't want to read past our boundaries wsize = size - offset wsize = WINDOW_SIZE if wsize > WINDOW_SIZE window = self.read(offset, wsize) res = window.index(search) return res + offset if res offset += WINDOW_SIZE - WINDOW_OVERLAP end end
Generated with the Darkfish Rdoc Generator 2.