Method: BFS::Bucket::InMem#ls

Defined in:
lib/bfs/bucket/in_mem.rb

#ls(pattern = '**/*', **_opts) ⇒ Object

Lists the contents of a bucket using a glob pattern



37
38
39
40
41
42
43
# File 'lib/bfs/bucket/in_mem.rb', line 37

def ls(pattern = '**/*', **_opts)
  Enumerator.new do |y|
    @files.each_key do |path|
      y << path if File.fnmatch?(pattern, path, File::FNM_PATHNAME)
    end
  end
end