Sha256: 23671fca7ba681a46c563589574b816ef8552b810b3f818fdb26aea50f493d8f

Contents?: true

Size: 353 Bytes

Versions: 16

Compression:

Stored size: 353 Bytes

Contents

module Puppet
  Puppet::Type.type(:file).newproperty(:type) do
    require 'etc'
    desc "A read-only state to check the file type."

    def retrieve
      current_value = :absent
      if stat = @resource.stat
        current_value = stat.ftype
      end
      current_value
    end

    validate do
      fail "type is read-only"
    end
  end
end

Version data entries

16 entries across 16 versions & 2 rubygems

Version Path
supply_drop-0.11.0 examples/vendored-puppet/vendor/puppet-2.7.8/lib/puppet/type/file/type.rb
supply_drop-0.10.2 examples/vendored-puppet/vendor/puppet-2.7.8/lib/puppet/type/file/type.rb
supply_drop-0.10.1 examples/vendored-puppet/vendor/puppet-2.7.8/lib/puppet/type/file/type.rb
supply_drop-0.10.0 examples/vendored-puppet/vendor/puppet-2.7.8/lib/puppet/type/file/type.rb
supply_drop-0.9.0 examples/vendored-puppet/vendor/puppet-2.7.8/lib/puppet/type/file/type.rb
supply_drop-0.8.1 examples/vendored-puppet/vendor/puppet-2.7.8/lib/puppet/type/file/type.rb
supply_drop-0.8.0 examples/vendored-puppet/vendor/puppet-2.7.8/lib/puppet/type/file/type.rb
supply_drop-0.7.0 examples/vendored-puppet/vendor/puppet-2.7.8/lib/puppet/type/file/type.rb
supply_drop-0.6.1 examples/vendored-puppet/vendor/puppet-2.7.8/lib/puppet/type/file/type.rb
supply_drop-0.6.0 examples/vendored-puppet/vendor/puppet-2.7.8/lib/puppet/type/file/type.rb
puppet-2.7.8 lib/puppet/type/file/type.rb
puppet-2.7.6 lib/puppet/type/file/type.rb
puppet-2.7.5 lib/puppet/type/file/type.rb
puppet-2.7.4 lib/puppet/type/file/type.rb
puppet-2.7.3 lib/puppet/type/file/type.rb
puppet-2.7.1 lib/puppet/type/file/type.rb