# File lib/chef/mixin/securable.rb, line 41 def mode(arg=nil) set_or_return( :mode, arg, :callbacks => { "not in valid numeric range" => lambda { |m| if m.kind_of?(String) m =~ /^0/ || m="0#{m}" end # Windows does not support the sticky or setuid bits if Chef::Platform.windows? Integer(m)<=0777 && Integer(m)>=0 else Integer(m)<=07777 && Integer(m)>=0 end }, } ) end