Sha256: 3d7da171a5b1f4f3e7ab4cd65fe3f68023563d3d4673f296759061a67045f7b4

Contents?: true

Size: 499 Bytes

Versions: 7

Compression:

Stored size: 499 Bytes

Contents

# frozen_string_literal: true

# Join file paths using ruby's `File.join()` function.
Puppet::Functions.create_function(:'file::join') do
  # @param paths The paths to join.
  # @return The joined file path.
  # @example Join file paths
  #   file::join('./path', 'to/files')
  dispatch :join do
    required_repeated_param 'String', :paths
    return_type 'String'
  end

  def join(*paths)
    Puppet.lookup(:bolt_executor) {}&.report_function_call(self.class.name)
    File.join(paths)
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
bolt-2.15.0 bolt-modules/file/lib/puppet/functions/file/join.rb
bolt-2.14.0 bolt-modules/file/lib/puppet/functions/file/join.rb
bolt-2.13.0 bolt-modules/file/lib/puppet/functions/file/join.rb
bolt-2.12.0 bolt-modules/file/lib/puppet/functions/file/join.rb
bolt-2.11.1 bolt-modules/file/lib/puppet/functions/file/join.rb
bolt-2.11.0 bolt-modules/file/lib/puppet/functions/file/join.rb
bolt-2.10.0 bolt-modules/file/lib/puppet/functions/file/join.rb