Hello,
I'm trying write a function who's able to determine if a file is a
directory or not.
Here's my function :
module Puppet::Parser::Functions
newfunction(:is_dir, :type => :rvalue) do |args|
File.directory?(args[0])
end
end
And how I use it :
if is_dir("/usr/local/etc") {
file {....}
} else { file{....} }
But it seems not work. It always do the first case.
Any ideas ?
Thanks.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Puppet Users" 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-users?hl=en
-~----------~----~----~----~------~----~------~--~---