Method: Inspec::Resources::FileResource#writable?

Defined in:
lib/inspec/resources/file.rb

#writable?(by_usergroup, by_specific_user) ⇒ Boolean

Returns:

  • (Boolean)


75
76
77
78
79
80
# File 'lib/inspec/resources/file.rb', line 75

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

  file_permission_granted?("write", by_usergroup, by_specific_user)
end