Sha256: e2022a346aaee834360579776f7c64198901d8593453068529fbe690ad527d1a
Contents?: true
Size: 731 Bytes
Versions: 27
Compression:
Stored size: 731 Bytes
Contents
#!/usr/bin/env ruby -w # encoding: UTF-8 # # = DirUtils.rb -- PostRunner - Manage the data from your Garmin sport devices. # # Copyright (c) 2014, 2015 by Chris Schlaeger <cs@taskjuggler.org> # # This program is free software; you can redistribute it and/or modify # it under the terms of version 2 of the GNU General Public License as # published by the Free Software Foundation. # require 'fileutils' module PostRunner module DirUtils def create_directory(dir, name) return if Dir.exists?(dir) Log.info "Creating #{name} directory #{dir}" begin FileUtils.mkdir_p(dir) rescue StandardError Log.fatal "Cannot create #{name} directory #{dir}: #{$!}" end end end end
Version data entries
27 entries across 27 versions & 1 rubygems