Sha256: d277352c0f5a483ffd5f52ca4a2605ab047aaf889d4adc649e4dde11a2418b94
Contents?: true
Size: 949 Bytes
Versions: 2
Compression:
Stored size: 949 Bytes
Contents
--- title: About the directory Resource --- # directory Use the `directory` InSpec audit resource to test if the file type is a directory. This is equivalent to using the `file` resource and the `be_directory` matcher, but provides a simpler and more direct way to test directories. All of the matchers available to `file` may be used with `directory`. # Syntax A `directory` resource block declares the location of the directory to be tested, and then one (or more) matchers: describe directory('path') do it { should MATCHER 'value' } end # Matchers This resource may use any of the matchers available to the `file` resource that may be useful when testing a directory. ## be <%= partial "/shared/matcher_be" %> ## cmp <%= partial "/shared/matcher_cmp" %> ## eq <%= partial "/shared/matcher_eq" %> ## include <%= partial "/shared/matcher_include" %> ## match <%= partial "/shared/matcher_match" %> # Examples None.
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
inspec-1.0.0 | docs/resources/directory.md.erb |
inspec-1.0.0.beta3 | docs/resources/directory.md.erb |