@staticmethod<EOL><INDENT>def declare_path(name, <EOL>rc_name=None, environ_name=None, filter=None, default_value=None,<EOL>fail_value=None):<DEDENT>
def _check_path(path):<EOL><INDENT>if path is None:<EOL><INDENT>if default_value is not None:<EOL><INDENT>try: return _check_path(default_value)<EOL>except Exception: pass<EOL><DEDENT>return None<EOL><DEDENT>path = os.path.expanduser(os.path.expandvars(path))<EOL>if not os.path.exists(path): raise ValueError('<STR_LIT>' % path)<EOL>path = os.path.abspath(path)<EOL>try:              return path if filter is None else filter(path)<EOL>except Exception: return fail_value<EOL><DEDENT>return config.declare(name, rc_name=rc_name, environ_name=environ_name, filter=_check_path,<EOL>default_value=None)<EOL>
config.declare_path(...) is equivalent to config.declare(...) except that it requires in
  addition that the value found for the config item be an existing file or dir on the local
  filesystem. Only if this is true is the value passed to any provided filter.

This function (similar to config.declare_file and config.declare_dir) is generally expected
to return some data--the contents of the path--not the path-name itself. For this reason
the handling of the default_value argument is expanded relative to that of config.declare().
If no value is provided or if all provided values are either not paths or fail the filter,
then the default_value is checked (as a path); if this also fails then the fail_value is
used as the config value. By default this is None, but note that by using a filter function
that loads the provided path (which will be guaranteed to exist) and yields the data along
with a fail_value that resembles 'default' data, one can effectively guarantee that data is
either loaded from a source on the filesystem or is in a coherent default state.

See also config.declare_dir and config.declare_file.