class Bixby::Provision::DirDSL
Constants
- EXPORTS
Public Instance Methods
create(path, opts={})
click to toggle source
# File lib/bixby/provision/dsl/dir.rb, line 9 def create(path, opts={}) logger.info "[dir] ensuring #{path} exists" path = File.expand_path(path) begin FileUtils.mkdir_p(path) if !File.exists? path chown(path, opts[:chown]) chmod(path, opts[:chmod]) rescue Errno::EACCES => ex logger.info "[dir] permission denied, trying again with sudo" logged_sudo("mkdir -p #{path}") chown(path, opts[:chown]) chmod(path, opts[:chmod]) end end
recreate(path, opts={})
click to toggle source
# File lib/bixby/provision/dsl/dir.rb, line 26 def recreate(path, opts={}) end