Method: InVFS.mapvfs

Defined in:
lib/invfs.rb

.mapvfs(vfs) ⇒ Object



102
103
104
105
106
107
108
109
110
111
112
113
114
# File 'lib/invfs.rb', line 102

def InVFS.mapvfs(vfs)
  return vfs unless vfs.it_a_file?

  v = @mapped_list[vfs]
  return v if v

  @handler_list.each do |handler|
    next unless handler.probe(vfs)
    return @mapped_list[vfs] = handler.open(vfs)
  end

  nil
end