Class: Inspec::Resources::Directory

Inherits:
FileResource show all
Defined in:
lib/inspec/resources/directory.rb

Instance Attribute Summary

Attributes inherited from FileResource

#file, #mount_options, #path

Instance Method Summary collapse

Methods inherited from FileResource

#allowed?, #contain, #content, #content_as_json, #content_as_yaml, #executable?, #immutable?, #inherited?, #initialize, #more_permissive_than?, #mounted?, #readable?, #resource_id, #sgid, #sticky, #suid, #user_permissions, #writable?

Methods included from Utils::LinuxMountParser

#includes_whitespaces?, #parse_mount_options

Methods included from FilePermissionsSelector

#select_file_perms_style

Constructor Details

This class inherits a constructor from Inspec::Resources::FileResource

Instance Method Details

#exist?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/inspec/resources/directory.rb', line 15

def exist?
  file.exist? && file.directory?
end

#to_sObject



19
20
21
# File 'lib/inspec/resources/directory.rb', line 19

def to_s
  "Directory #{source_path}"
end