module Superhosting::Helper::File

Public Instance Methods

chmod!(mode, path) click to toggle source
# File lib/superhosting/helper/file.rb, line 46
def chmod!(mode, path)
  self.debug_operation(desc: { code: :chmod, data: { mode: mode, path: path } }) do |&blk|
    self.with_dry_run do |dry_run|
      FileUtils.chmod(mode, path) unless dry_run
      blk.call(code: :ok)
    end
  end
end
chown!(user, group, path) click to toggle source
# File lib/superhosting/helper/file.rb, line 37
def chown!(user, group, path)
  self.debug_operation(desc: { code: :chown, data: { user: user, group: group, path: path } }) do |&blk|
    self.with_dry_run do |dry_run|
      FileUtils.chown(user, group, path) unless dry_run
      blk.call(code: :ok)
    end
  end
end
chown_r!(user, group, path) click to toggle source
# File lib/superhosting/helper/file.rb, line 28
def chown_r!(user, group, path)
  self.debug_operation(desc: { code: :chown_r, data: { user: user, group: group, path: path } }) do |&blk|
    self.with_dry_run do |dry_run|
      FileUtils.chown_R(user, group, path) unless dry_run
      blk.call(code: :ok)
    end
  end
end