Method: Train::Extras::WindowsFile#content

Defined in:
lib/train/extras/file_windows.rb

#contentObject



31
32
33
34
35
36
37
38
# File 'lib/train/extras/file_windows.rb', line 31

def content
  return @content if defined?(@content)
  @content = @backend.run_command(
    "Get-Content(\"#{@spath}\") | Out-String").stdout
  return @content unless @content.empty?
  @content = nil if directory? # or size.nil? or size > 0
  @content
end