Skip to content

PDDB Path Conventions

Sean Cross edited this page Jun 27, 2022 · 11 revisions

A PDDB Path may be a dict, a dict + a key, a basis + dict, or a basis + dict + key. In the following examples, the given Basis, Dict, and Key are as follows:

  • Basis: .System
  • Dict: wlan.networks
  • Key: Home Wifi

A canonical path looks like:

[:BASIS:]DICT1.DICT2.DICT3[:KEY]

Examples:

  • :foo -- A key named "foo" in the default basis in the "" dict. Possibly illegal.
  • :bar: -- A basis named "bar"
  • baz -- A dict named "baz" in the default basis
  • lorem.ipsum -- A dict named "lorem.ipsum", which may be considered a path, in the default ba
  • :bar:lorem.ipsum -- A dict named "lorem.ipsum" in the basis "bar"
  • lorem.ipsum:foo -- A key named "foo" in the dict "lorem.ipsum" in the default basis
  • :bar:lorem.ipsum:foo -- a fully-qualified path
  • : -- The root, which lists every basis. Files cannot be created here. "Directories" can be created and destroyed, which corresponds to creating and destroying bases.
  • -- The empty string lists all dicts in the default basis

Corner cases:

  • : : -- A basis named " ". Legal, but questionable
  • -- A dict named " " in the default basis. Legal, but questionable.
  • : -- Also a dict named " " in the default basis.
  • : -- A key named " " in a dict called " ". Legal.
  • baz: -- A dict named "baz" in the default basis with an extra ":" following. Legal.
  • baz:foo: -- A key named "foo:" in a dict named "baz" in the default basis. Illegal.
  • :: -- An empty key in an empty dict in the default basis. Illegal.
  • ::: -- An key named ":" in an empty dict in the default basis. Illegal.
  • :::: -- An key named "::" in an empty dict in the default basis. Illegal.
  • ::foo -- A key "foo" in an empty dict in the default basis. Illegal.
  • :lorem.ipsum:foo:baz -- A key called "foo:baz: in the dict "lorem.ipsum". Illegal,
  • :bar:lorem.ipsum:foo:baz -- A key called "foo:baz" in the dict "lorem.ipsum" in the basis "bar". Illegal.

Any reference to "default basis" depends on whether the operation is a "read" or a "write":

  • "Read" operations come from a union, with the most-recently-added basis taking precedence
  • "Write" operations including key creation go to the most-recently-added basis
Clone this wiki locally