module EDB::Storage::Filesystem
Public Class Methods
upload(source)
click to toggle source
# File lib/edb/storage/filesystem.rb, line 30 def upload(source) filesystem = ::EDB.opts[:STORAGE][:Filesystem] path = File.expand_path(filesystem[:path]) folder = source.split('/')[0..-2].join('/') path = File.join(path, folder) ::EDB::Logger.log(:info, "Copying #{source} to #{path}...") FileUtils.mkdir_p(path) unless Dir.exists?(path) source = File.join('./', source) FileUtils.cp_r(source, path) end