Module: RFacter::DSL::Facter::Util::FileRead

Defined in:
lib/rfacter/dsl.rb

Overview

TODO:

Possibly augment this with some top-level shims for File?

Note:

The exists? part is uniqe to RFacter.

Methods for interacting with remote files.

Since:

  • 0.1.0

Class Method Summary collapse

Class Method Details

.exists?(path) ⇒ Boolean

Since:

  • 0.1.0



325
326
327
# File 'lib/rfacter/dsl.rb', line 325

def self.exists?(path)
  NODE.value.file(path).exist?
end

.read(path) ⇒ Object

Since:

  • 0.1.0



321
322
323
# File 'lib/rfacter/dsl.rb', line 321

def self.read(path)
  NODE.value.file(path).content
end