Method: Chef::ApiClient::Registration#file_flags

Defined in:
lib/chef/api_client/registration.rb

#file_flagsObject



191
192
193
194
195
196
197
198
# File 'lib/chef/api_client/registration.rb', line 191

def file_flags
  base_flags = File::CREAT | File::TRUNC | File::RDWR
  # Windows doesn't have symlinks, so it doesn't have NOFOLLOW
  if defined?(File::NOFOLLOW) && !Chef::Config[:follow_client_key_symlink]
    base_flags |= File::NOFOLLOW
  end
  base_flags
end