# File lib/fog/local/storage.rb, line 55 def initialize(options={}) require 'mime/types' @local_root = ::File.expand_path(options[:local_root]) end
# File lib/fog/local/storage.rb, line 68 def copy_object(source_directory_name, source_object_name, target_directory_name, target_object_name, options={}) require 'fileutils' source_path = path_to(::File.join(source_directory_name, source_object_name)) target_path = path_to(::File.join(target_directory_name, target_object_name)) ::FileUtils.mkdir_p(::File.dirname(source_path)) ::FileUtils.copy_file(source_path, target_path) end
# File lib/fog/local/storage.rb, line 60 def local_root @local_root end
# File lib/fog/local/storage.rb, line 64 def path_to(partial) ::File.join(@local_root, partial) end