def save(file=nil,format=nil,opts={})
      format = @format if format.nil?
      file = @filename if file.nil?

      if format != FORMAT_BINARY && format != FORMAT_XML && format != FORMAT_PLAIN
        raise CFFormatError.new("Format #{format} not supported, use List::FORMAT_BINARY or List::FORMAT_XML")
      end

      if(!File.exists?(file)) then
        raise IOError.new("File #{file} not writable!") unless File.writable?(File.dirname(file))
      elsif(!File.writable?(file)) then
        raise IOError.new("File #{file} not writable!")
      end

      opts[:root] = @value
      opts[:formatted] = @formatted unless opts.has_key?(:formatted)

      prsr = @@parsers[format-1].new

      content = prsr.to_str(opts)

      File.open(file, 'wb') {
        |fd|
        fd.write content
      }
    end
def save(file=nil,format=nil,opts={})
      format = @format if format.nil?
      file = @filename if file.nil?

      if format != FORMAT_BINARY && format != FORMAT_XML && format != FORMAT_PLAIN
        raise CFFormatError.new("Format #{format} not supported, use List::FORMAT_BINARY or List::FORMAT_XML")
      end

      if(!File.exists?(file)) then
        raise IOError.new("File #{file} not writable!") unless File.writable?(File.dirname(file))
      elsif(!File.writable?(file)) then
        raise IOError.new("File #{file} not writable!")
      end

      opts[:root] = @value
      opts[:formatted] = @formatted unless opts.has_key?(:formatted)

      prsr = @@parsers[format-1].new

      content = prsr.to_str(opts)

      File.open(file, 'wb') {
        |fd|
        fd.write content
      }
    end
Serialize CFPropertyList object to specified format and write it to file
 file = nil:: The filename of the file to write to. Uses +filename+ instance variable if nil
 format = nil:: The format to save in. Uses +format+ instance variable if nil