mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-11-13 02:08:55 +00:00
Added CommonJS extensions to CFPropertyList.
Reviewed by me.
This commit is contained in:
1 parent
b078169adf
commit
94d3053232
1 file changed
+12
@@ -60,6 +60,18 @@ CFPropertyList.stringFromPropertyList = function(/*CFPropertyList*/ aPropertyLis
|
||||
serializers["finish"]();
|
||||
}
|
||||
|
||||
#ifdef COMMONJS
|
||||
CFPropertyList.readPropertyListFromFile = function(/*String*/ aFilePath)
|
||||
{
|
||||
return CFPropertyList.propertyListFromString(FILE.read(aFilePath, { charset:"UTF-8" }));
|
||||
}
|
||||
|
||||
CFPropertyList.writePropertyListToFile = function(/*CFPropertyList*/ aPropertyList, /*String*/ aFilePath)
|
||||
{
|
||||
return FILE.write(aFilePath, CFPropertyList.stringFromPropertyList(aPropertyList), { charset:"UTF-8" });
|
||||
}
|
||||
#endif
|
||||
|
||||
function serializePropertyList(/*CFPropertyList*/ aPropertyList, /*Object*/ serializers)
|
||||
{
|
||||
var type = typeof aPropertyList,
|
||||
|
||||
Reference in new issue
Block a user