| Class | CFPropertyList::List |
| In: |
lib/cfpropertylist/rbCFPropertyList.rb
|
| Parent: | Object |
Class representing a CFPropertyList. Instanciate with new
| FORMAT_BINARY | = | 1 | Format constant for binary format | |
| FORMAT_XML | = | 2 | Format constant for XML format | |
| FORMAT_PLAIN | = | 3 | Format constant for the old plain format | |
| FORMAT_AUTO | = | 0 | Format constant for automatic format recognizing |
| filename | [RW] | Path of PropertyList |
| format | [RW] | the original format of the PropertyList |
| formatted | [RW] | default value for XML generation; if true generate formatted XML |
| value | [RW] | the root value in the plist file |
initialize a new CFPropertyList, arguments are:
| :file: | Parse a file |
| :format: | Format is one of FORMAT_BINARY or FORMAT_XML. Defaults to FORMAT_AUTO |
| :data: | Parse a string |
All arguments are optional
Read a plist file
| file = nil: | The filename of the file to read. If nil, use filename instance variable |
| format = nil: | The format of the plist file. Auto-detect if nil |
read a binary plist file
| filename = nil: | The filename to read from; if nil, read from the file defined by instance variable filename |
read a plain plist file
| filename = nil: | The filename to read from; if nil, read from the file defined by instance variable filename |
load a plist from a string
| str = nil: | The string containing the plist |
| format = nil: | The format of the plist |
Load an XML PropertyList
| filename = nil: | The filename to read from; if nil, read from the file defined by instance variable filename |
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 |
convert plist to string
| format = List::FORMAT_BINARY: | The format to save the plist |
| opts={}: | Pass parser options |