Method: Inspec::Resources::UnixFilePermissions#permission_flag

Defined in:
lib/resources/file.rb

#permission_flag(access_type) ⇒ Object



160
161
162
163
164
165
166
167
168
169
170
171
# File 'lib/resources/file.rb', line 160

def permission_flag(access_type)
  case access_type
  when 'read'
    'r'
  when 'write'
    'w'
  when 'execute'
    'x'
  else
    raise 'Invalid access_type provided'
  end
end