module FileHelper
Utility to manage various directory functions
Public Instance Methods
files(dirname, glob = "**/*")
click to toggle source
# File lib/core/helpers/file_helper.rb, line 13 def files(dirname, glob = "**/*") files = [] ConfDirHelper.get_conf_paths(dirname).each do |dir| find = "#{dir}#{glob}" files << Dir.glob(find).select { |f| File.file?(f) } if Dir.exist?(dir) end files.flatten.map { |f| File.absolute_path(f) } end
temp_dir(folder = SecureRandom.uuid)
click to toggle source
# File lib/core/helpers/file_helper.rb, line 7 def temp_dir(folder = SecureRandom.uuid) path = "/tmp/radial/#{folder}" FileUtils.mkdir_p path path end