class Asciidoctor::AbstractNode

def read_asset(path, opts = {})

if the file does not exist.
Returns the [String] content of the file at the specified path, or nil

are normalized and coerced to UTF-8 (default: false)
* :normalize a Boolean that controls whether the lines
is issued if the file cannot be read (default: false)
* :warn_on_failure a Boolean that controls whether a warning
opts - a Hash of options to control processing (default: {})
path - the String path from which to read the contents

that the file is readable before attempting to read it.
This method assumes that the path is safe to read. It checks
Public: Read the contents of the file at the specified path.
def read_asset(path, opts = {})
  # remap opts for backwards compatibility
  opts = { :warn_on_failure => (opts != false) } unless ::Hash === opts
  if ::File.readable? path
    if opts[:normalize]
      Helpers.normalize_lines_from_string(::IO.read(path)) * EOL
    else
      # QUESTION should we chomp or rstrip content?
      ::IO.read(path)
    end
  else
    warn %(asciidoctor: WARNING: file does not exist or cannot be read: #{path}) if opts[:warn_on_failure]
    nil
  end
end