Sha256: acae44ea9fd639cfbdec8632be1e4f205cf79c7c5c79ad18b04255c955ba3d09

Contents?: true

Size: 337 Bytes

Versions: 16

Compression:

Stored size: 337 Bytes

Contents

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

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

    validate do
      fail "mtime 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/mtime.rb
supply_drop-0.10.2 examples/vendored-puppet/vendor/puppet-2.7.8/lib/puppet/type/file/mtime.rb
supply_drop-0.10.1 examples/vendored-puppet/vendor/puppet-2.7.8/lib/puppet/type/file/mtime.rb
supply_drop-0.10.0 examples/vendored-puppet/vendor/puppet-2.7.8/lib/puppet/type/file/mtime.rb
supply_drop-0.9.0 examples/vendored-puppet/vendor/puppet-2.7.8/lib/puppet/type/file/mtime.rb
supply_drop-0.8.1 examples/vendored-puppet/vendor/puppet-2.7.8/lib/puppet/type/file/mtime.rb
supply_drop-0.8.0 examples/vendored-puppet/vendor/puppet-2.7.8/lib/puppet/type/file/mtime.rb
supply_drop-0.7.0 examples/vendored-puppet/vendor/puppet-2.7.8/lib/puppet/type/file/mtime.rb
supply_drop-0.6.1 examples/vendored-puppet/vendor/puppet-2.7.8/lib/puppet/type/file/mtime.rb
supply_drop-0.6.0 examples/vendored-puppet/vendor/puppet-2.7.8/lib/puppet/type/file/mtime.rb
puppet-2.7.8 lib/puppet/type/file/mtime.rb
puppet-2.7.6 lib/puppet/type/file/mtime.rb
puppet-2.7.5 lib/puppet/type/file/mtime.rb
puppet-2.7.4 lib/puppet/type/file/mtime.rb
puppet-2.7.3 lib/puppet/type/file/mtime.rb
puppet-2.7.1 lib/puppet/type/file/mtime.rb