Method: Marsdawn::Storage::FileSystem#finalize

Defined in:
lib/marsdawn/storage/file_system.rb

#finalizeObject



29
30
31
32
33
34
# File 'lib/marsdawn/storage/file_system.rb', line 29

def finalize
  target_dir = File.dirname(@target_path)
  FileUtils.mkdir_p target_dir, :mode => @config[:mode_dir] unless File.exists?(target_dir)
  FileUtils.remove_entry_secure @target_path if File.exists?(@target_path)
  FileUtils.mv @tmproot, @target_path
end