lib/specinfra/command/base/file.rb in specinfra-2.0.0.beta17 vs lib/specinfra/command/base/file.rb in specinfra-2.0.0.beta18
- old
+ new
@@ -91,7 +91,20 @@
end
def get_size(file)
"stat -c %s #{escape(file)}"
end
+
+ def change_mode(file, mode)
+ "chmod #{mode} #{escape(file)}"
+ end
+
+ def change_owner(file, owner, group=nil)
+ owner = "#{owner}:#{group}" if group
+ "chown #{owner} #{escape(file)}"
+ end
+
+ def change_group(file, group)
+ "chgrp #{group} #{escape(file)}"
+ end
end
end