#cp.plist

Reads & Writes plist data.


#Submodules


#API Overview

Functions - API calls offered directly by the extension


#API Documentation

#Functions

Signaturecp.plist.base64ToTable(base64Data) -> table | nil, string
TypeFunction
DescriptionConverts base64 encoded Property List string into a Table.
Parameters
  • base64Data - Binary data encoded in base64 as a string
Returns
  • A table of the plist data
  • A error message as string if an error occurs
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/plist/init.lua line 19

Signaturecp.plist.binaryFileToTable(plistFileName) -> table | nil, string
TypeFunction
DescriptionConverts the data from a Binary File into a LUA Table.
Parameters
  • plistFileName - Path & Filename of the Binary File
Returns
  • data - A table of plist data, or nil if there was a problem.
  • err - The error message, or nil if there were no problems.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/plist/init.lua line 107

Signaturecp.plist.binaryFileToXML(plistFileName) -> string | nil, string
TypeFunction
DescriptionConverts the data from a Binary plist File into XML as a string.
Parameters
  • plistFileName - Path & Filename of the Binary File
Returns
  • data - A string of XML data
  • err - The error message, or nil if there were no problems.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/plist/init.lua line 140

Signaturecp.plist.binaryToTable(binaryData) -> table | nil, string
TypeFunction
DescriptionConverts Binary Data into a LUA Table.
Parameters
  • binaryData - Binary data
Returns
  • data - A string of XML data
  • err - The error message, or nil if there were no problems.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/plist/init.lua line 74

Signaturecp.plist.fileToTable(plistFileName) -> table | nil, string
TypeFunction
DescriptionConverts plist data from a binary or XML file into a LUA Table.
Parameters
  • plistFileName - Path & Filename of the XML File
Returns
  • data - A table of plist data, or nil if there was a problem.
  • err - The error message, or nil if there were no problems.
Notes
  • It will check the file prior to loading to determine which type it is.
  • If you know which type of file you're dealing with in advance, you can use cp.plist.xmlFileToTable() or hs.plist.binaryFileToTable() instead.
ExamplesNone
Sourcesrc/extensions/cp/plist/init.lua line 210

Signaturecp.plist.isBinaryPlist(data) -> boolean
TypeFunction
DescriptionChecks if the provided data is a binary plist.
Parameters
  • data - The data to check
Returns
  • true if it is a binary plist, false otherwise.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/plist/init.lua line 260

Signaturecp.plist.isBinaryPlistFile(plistList) -> boolean
TypeFunction
DescriptionReturns true if plistList is a binary plist file otherwise false.
Parameters
  • plistList - Path to the file
Returns
  • Boolean
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/plist/init.lua line 315

Signaturecp.plist.isPlist(data) -> boolean
TypeFunction
DescriptionChecks if the data is either a binary or XML plist data string.
Parameters
  • data - The data to check
Returns
  • true if the data is a plist, false otherwise.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/plist/init.lua line 243

Signaturecp.plist.isPlistFile(plistFileName) -> boolean
TypeFunction
DescriptionChecks if the provided file is a binary or XML plist file.
Parameters
  • plistFileName - Path & Filename of the XML File
Returns
  • true if it is a binary or XML plist file, false otherwise.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/plist/init.lua line 289

Signaturecp.plist.isXMLPlist(data) -> boolean
TypeFunction
DescriptionChecks if the provided data is an XML plist.
Parameters
  • data - The data to check
Returns
  • true if it is an XML plist, false otherwise.
Notes
  • This will only check if it is an XML file, it does not check the actual format is correct.
ExamplesNone
Sourcesrc/extensions/cp/plist/init.lua line 273

Signaturecp.plist.isXMLPlistFile(plistList) -> boolean
TypeFunction
DescriptionReturns true if plistList is (probably) an XML plist file otherwise false.
Parameters
  • plistList - Path to the file
Returns
  • Boolean
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/plist/init.lua line 342

Signaturecp.plist.xmlFileToTable(plistFileName) -> table | nil, string
TypeFunction
DescriptionConverts XML data from a file into a LUA Table.
Parameters
  • plistFileName - Path & Filename of the XML File
Returns
  • data - A table of plist data, or nil if there was a problem.
  • err - The error message, or nil if there were no problems.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/plist/init.lua line 180

Signaturecp.plist.xmlToTable(plistXml) -> table | nil, string
TypeFunction
DescriptionConverts an XML plist string into a LUA Table.
Parameters
  • plistXml - The XML string
Returns
  • data - A table of plist data, or nil if there was a problem.
  • err - The error message, or nil if there were no problems.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/plist/init.lua line 165