R.I.Pienaar wrote:
----- "Markus Roberts" <[email protected]> wrote:
Could be as simple as something like:
module Puppet::Parser::Functions
newfunction(:path_components, :type => :rvalue) do |args|
File.split(args[0]).inject([]) { |segements,segment| segments <<
File.join((segments.last || ''),segment) }
end
end
We discussed such a solution a while ago on IRC, this is pretty
good, we should just add the ability to set a start position, so
that for example you don't try to manage /, /usr, /usr/local but
only /usr/local/your and /usr/local/your/stuff
Someone already posted such a function, in that very ticket...
*Cough*
/Bellman
--
You received this message because you are subscribed to the Google Groups "Puppet
Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-dev?hl=en.