Anons79 Mini Shell

Directory : /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type/file/
Upload File :
Current File : //opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type/file/type.rb

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
      stat = @resource.stat
      if stat
        current_value = stat.ftype
      end
      current_value
    end

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


Anons79 File Manager Version 1.0, Coded By Anons79
Email: [email protected]