Method: Inspec::Resources::FileResource#readable?

Defined in:
lib/resources/file.rb

#readable?(by_usergroup, by_specific_user) ⇒ Boolean

Returns:

  • (Boolean)


66
67
68
69
70
71
# File 'lib/resources/file.rb', line 66

def readable?(by_usergroup, by_specific_user)
  return false unless exist?
  return skip_resource '`readable?` is not supported on your OS yet.' if @perms_provider.nil?

  file_permission_granted?('read', by_usergroup, by_specific_user)
end