Method: Specinfra::Command::Openbsd::Base::File.check_has_mode

Defined in:
lib/specinfra/command/openbsd/base/file.rb

.check_has_mode(file, mode) ⇒ Object


15
16
17
18
# File 'lib/specinfra/command/openbsd/base/file.rb', line 15

def check_has_mode(file, mode)
  regexp = "^#{mode}$"
  "stat -f%Lp #{escape(file)} | grep #{escape(regexp)}"
end