Sha256: 2be24fd9b374ca97a19ca3cdb2c56039232222b3fc859d6431c65a55e5b42caa
Contents?: true
Size: 633 Bytes
Versions: 6
Compression:
Stored size: 633 Bytes
Contents
module Puppet Puppet::Type.type(:file).newproperty(:type) do require 'etc' desc "A read-only state to check the file type." #munge do |value| # raise Puppet::Error, ":type is read-only" #end def retrieve currentvalue = :absent if stat = @resource.stat(false) currentvalue = stat.ftype end # so this state is never marked out of sync @should = [currentvalue] return currentvalue end def sync raise Puppet::Error, ":type is read-only" end end end
Version data entries
6 entries across 6 versions & 1 rubygems