Sha256: 3794e31a8876be5a8d7837efa1bdf664e8db9af2d25cb1511f4fd8622ccfa065

Contents?: true

Size: 1.56 KB

Versions: 11

Compression:

Stored size: 1.56 KB

Contents

Property Lists (`*.plist` Files)
==============================================================================

Property lists are an Apple-specific serialization format:

<https://en.wikipedia.org/wiki/Property_list>

They come in several formats - XML, binary and a funky "old" / NeXTSTEP custom encoding.

We care about them because {file:doc/topics/launchd.md}'s {file:doc/topics/agents.md} are defined in plist files.

All the agent plists I've seen are in XML format, and that's what Loc'd writes and expects to find when reading.

For more info on launchd plists check out:

<https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPages/man5/launchd.plist.5.html>


plists in Ruby
------------------------------------------------------------------------------

Loc'd uses the [plist][] gem to read and write agent plists:

1.  [Plist.parse_xml][] to parse agent plist XML files to Ruby hashes.
    
2.  [Plist::Emit.dump][] to encode Ruby hashes into plist XML for writing.

When you see a `plist` in Loc'd it should be a Ruby hash that was read from an agent plist file and/or created or mutated to be written to an agent plist file (plists are a general data format, but the top-level object in agent plists should always be a `dict`, which is mapped to a Ruby hash).

The keys of these hashes should all be strings. For details on the possible Ruby value types see

<http://www.rubydoc.info/gems/plist#Generation>


<!-- References & Further Reading: -->

[plist]: https://rubygems.org/gems/plist

[Plist.parse_xml]: http://www.rubydoc.info/gems/plist/Plist.parse_xml

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
locd-0.1.13 doc/files/topics/plists.md
locd-0.1.12 doc/files/topics/plists.md
locd-0.1.11 doc/files/topics/plists.md
locd-0.1.10 doc/files/topics/plists.md
locd-0.1.9 doc/files/topics/plists.md
locd-0.1.8 doc/files/topics/plists.md
locd-0.1.7 doc/files/topics/plists.md
locd-0.1.6 doc/files/topics/plists.md
locd-0.1.5 doc/files/topics/plists.md
locd-0.1.4 doc/files/topics/plists.md
locd-0.1.3 doc/files/topics/plists.md