Sha256: de15245fdc12eab3f7ff674181a3061dd4f50e9df0306b94587e1092af3f1299

Contents?: true

Size: 343 Bytes

Versions: 53

Compression:

Stored size: 343 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 |val|
      fail "mtime is read-only"
    end
  end
end

Version data entries

53 entries across 53 versions & 3 rubygems

Version Path
puppet-parse-0.1.4 lib/vendor/puppet/type/file/mtime.rb
puppet-parse-0.1.3 lib/vendor/puppet/type/file/mtime.rb
puppet-parse-0.1.2 lib/vendor/puppet/type/file/mtime.rb
puppet-parse-0.1.1 lib/vendor/puppet/type/file/mtime.rb
puppet-2.7.26 lib/puppet/type/file/mtime.rb
puppet-2.7.25 lib/puppet/type/file/mtime.rb
puppet-2.7.24 lib/puppet/type/file/mtime.rb
puppet-3.2.4 lib/puppet/type/file/mtime.rb
puppet-2.7.23 lib/puppet/type/file/mtime.rb
puppet-3.2.3 lib/puppet/type/file/mtime.rb
puppet-3.2.3.rc1 lib/puppet/type/file/mtime.rb
puppet-3.2.2 lib/puppet/type/file/mtime.rb
puppet-2.7.22 lib/puppet/type/file/mtime.rb
puppet-3.2.1 lib/puppet/type/file/mtime.rb
puppet-3.2.1.rc1 lib/puppet/type/file/mtime.rb
puppet-3.2.0.rc2 lib/puppet/type/file/mtime.rb
librarian-puppet-0.9.9 vendor/gems/ruby/1.9.1/gems/puppet-3.1.0/lib/puppet/type/file/mtime.rb
puppet-3.2.0.rc1 lib/puppet/type/file/mtime.rb
puppet-parse-0.1.0 lib/vendor/puppet/type/file/mtime.rb
puppet-parse-0.0.6 lib/vendor/puppet/type/file/mtime.rb