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

Instance Method Summary collapse

Methods inherited from FileResource

#allowed?, #contain, #content, #executable?, #initialize, #more_permissive_than?, #mounted?, #readable?, #sgid, #sticky, #suid, #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