Method: Puppet::FileServing::Base#full_path
- Defined in:
- lib/puppet/file_serving/base.rb
#full_path ⇒ Object
Return the full path to our file. Fails if there’s no path set.
22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/puppet/file_serving/base.rb', line 22 def full_path if relative_path.nil? or relative_path == "" or relative_path == "." full_path = path else full_path = File.join(path, relative_path) end if Puppet::Util::Platform.windows? # Replace multiple slashes as long as they aren't at the beginning of a filename full_path.gsub(%r{(./)/+}, '\1') else full_path.gsub(%r{//+}, '/') end end |