class SimpleBackup::Source::File
Public Instance Methods
configure(options = {})
click to toggle source
# File lib/simple_backup/source/file.rb, line 4 def configure(options = {}) raise "Must provide :path parameter" unless options[:path] @path = options[:path] raise "#{@path} is a directory - use Dir source instead of File" unless !::File.exist?(@path) or ::File.file?(@path) end
Private Instance Methods
prepare_data()
click to toggle source
# File lib/simple_backup/source/file.rb, line 12 def prepare_data return false unless ::File.exist?(@path) FileUtils.cp @path, @tmp_dir true end