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

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

.check_has_mode(file, mode) ⇒ Object


19
20
21
22
# File 'lib/specinfra/command/darwin/base/file.rb', line 19

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