class Train::Extras::LinuxFile

Public Instance Methods

content() click to toggle source
# File lib/train/extras/file_linux.rb, line 7
def content
  return @content if defined?(@content)
  @content = @backend.run_command(
    "cat #{@spath} || echo -n").stdout
  return @content unless @content.empty?
  @content = nil if directory? or size.nil? or size > 0
  @content
end