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

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

.check_has_mode(file, mode) ⇒ Object


53
54
55
56
# File 'lib/specinfra/command/base/file.rb', line 53

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