Module: Chef::FileAccessControl::Windows::ClassMethods

Defined in:
lib/chef/file_access_control/windows.rb

Instance Method Summary collapse

Instance Method Details

#writable?(path) ⇒ Boolean

We want to mix these in as class methods

Returns:

  • (Boolean)


35
36
37
38
39
# File 'lib/chef/file_access_control/windows.rb', line 35

def writable?(path)
  ::File.exist?(path) && Chef::ReservedNames::Win32::File.file_access_check(
    path, Chef::ReservedNames::Win32::API::Security::FILE_GENERIC_WRITE
  )
end