Sha256: eca528fc6a1eaec43891f2cfc642e9074b9bf324246babd6677a99dba4e18f37

Contents?: true

Size: 495 Bytes

Versions: 43

Compression:

Stored size: 495 Bytes

Contents

#
# file_exists.rb
#
module Puppet::Parser::Functions
  newfunction(:file_exists, :type => :rvalue, :doc => <<-EOS
Returns an boolean value if a given file and/or directory exists on Puppet Master.
EOS
  ) do |args|
    
    value = nil
    CORL.run do
      raise(Puppet::ParseError, "file_exists(): Must have a file or directory name specified; " +
        "given (#{args.size} for 1)") if args.size < 1
      
      value = CORL::Util::Disk.exists?(args[0])
    end
    return value
  end
end

Version data entries

43 entries across 43 versions & 1 rubygems

Version Path
corl-0.5.18 lib/puppet/parser/functions/file_exists.rb
corl-0.5.17 lib/puppet/parser/functions/file_exists.rb
corl-0.5.16 lib/puppet/parser/functions/file_exists.rb
corl-0.5.15 lib/puppet/parser/functions/file_exists.rb
corl-0.5.14 lib/puppet/parser/functions/file_exists.rb
corl-0.5.13 lib/puppet/parser/functions/file_exists.rb
corl-0.5.12 lib/puppet/parser/functions/file_exists.rb
corl-0.5.11 lib/puppet/parser/functions/file_exists.rb
corl-0.5.10 lib/puppet/parser/functions/file_exists.rb
corl-0.5.9 lib/puppet/parser/functions/file_exists.rb
corl-0.5.8 lib/puppet/parser/functions/file_exists.rb
corl-0.5.7 lib/puppet/parser/functions/file_exists.rb
corl-0.5.6 lib/puppet/parser/functions/file_exists.rb
corl-0.5.5 lib/puppet/parser/functions/file_exists.rb
corl-0.5.4 lib/puppet/parser/functions/file_exists.rb
corl-0.5.3 lib/puppet/parser/functions/file_exists.rb
corl-0.5.2 lib/puppet/parser/functions/file_exists.rb
corl-0.5.1 lib/puppet/parser/functions/file_exists.rb
corl-0.5.0 lib/puppet/parser/functions/file_exists.rb
corl-0.4.29 lib/puppet/parser/functions/file_exists.rb