Puppet Function: mysql_dirname
- Defined in:
- lib/puppet/parser/functions/mysql_dirname.rb
- Function type:
- Ruby 3.x API
Overview
Returns the dirname of a path.
2 3 4 5 6 7 8 9 10 11 12 |
# File 'lib/puppet/parser/functions/mysql_dirname.rb', line 2 newfunction(:mysql_dirname, :type => :rvalue, :doc => <<-EOS Returns the dirname of a path. EOS ) do |arguments| raise(Puppet::ParseError, "mysql_dirname(): Wrong number of arguments " + "given (#{arguments.size} for 1)") if arguments.size < 1 path = arguments[0] return File.dirname(path) end |