1 class Specinfra::Command::Windows::Base::File < Specinfra::Command::Windows::Base
3 def check_is_owned_by(file, owner)
4 Backend::PowerShell::Command.new do
5 exec "if((Get-Item '#{file}').GetAccessControl().Owner -match '#{owner}'
6 -or ((Get-Item '#{file}').GetAccessControl().Owner -match '#{owner}').Length -gt 0){ exit 0 } else { exit 1 }"
13 class Specinfra::Command::Base::File < Specinfra::Command::Base
16 "cat '#{file}' 2> /dev/null || echo -n"