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

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

.check_is_owned_by(file, owner) ⇒ Object

[View source]

24
25
26
27
# File 'lib/specinfra/command/darwin/base/file.rb', line 24

def check_is_owned_by(file, owner)
  regexp = "^#{owner}$"
  "stat -f %Su #{escape(file)} | grep -- #{escape(regexp)}"
end