Method: BC3::Snapshot#build_index

Defined in:
lib/bc3/snapshot.rb

#build_indexObject

Build an index.

The index allows a faster process on each.

When the content changes (or content of one of the folders in the snapshot) then the index is deleted. See BC3::Snapshot#reset_index



256
257
258
259
260
261
262
263
264
# File 'lib/bc3/snapshot.rb', line 256

def build_index()
  $log.debug("Build index")
  @index = {}
  @basefolder.each(:recursive,:folders, :files){|key, content| 
    @index[key] = content
    content.snapshotpath[self] = key
  }
  @index
end