# File lib/specinfra/command/base/file.rb, line 44 def check_is_owned_by(file, owner) regexp = "^#{owner}$" if owner.is_a?(Numeric) || (owner =~ /\A\d+\z/ ? true : false) "stat -c %u #{escape(file)} | grep -- #{escape(regexp)}" else "stat -c %U #{escape(file)} | grep -- #{escape(regexp)}" end end