def save_to(file)
      if file.kind_of?(String)
        begin
          File.open(file, "w") do |f|
            f.puts to_ser.to_yaml
          end
        rescue Errno::ENOENT
          raise DirCatException.new, "DirCat: cannot write into '#{file}'", caller
        end
      else
        file.puts to_ser.to_yaml
      end
    end
def save_to(file)
      if file.kind_of?(String)
        begin
          File.open(file, "w") do |f|
            f.puts to_ser.to_yaml
          end
        rescue Errno::ENOENT
          raise DirCatException.new, "DirCat: cannot write into '#{file}'", caller
        end
      else
        file.puts to_ser.to_yaml
      end
    end
Save serialized catalog to file
 @param [String,File] file