class Inspec::DirProvider

def binread(file)

def binread(file)
  return nil unless files.include?(file)
  return nil unless File.file?(file)
  File.binread(file)
end

def initialize(path)

def initialize(path)
  @files = if File.file?(path)
             [path]
           else
             Dir[File.join(Shellwords.shellescape(path), '**', '*')]
           end
  @path = path
end

def read(file)

def read(file)
  return nil unless files.include?(file)
  return nil unless File.file?(file)
  File.read(file)
end