Crate openpathresolver

Crate openpathresolver 

Source
Expand description

Find paths based on a structured query or build out a tree in the filesystem.

The open path resolver contains two parts. The path resolver is responsible for finding paths or the elements used to find a path. This can be used either to get where to save a file or where to try to find a file to load.

The workspace resolver is responsible for building out a tree for a given query. For example, if there is a location to save published elements and workspaces for building out the elements, and a user needs to build out the “Widget” element, then the system can automatically build out the file and folder structure needed for the user to do their work.

Structs§

Config
Store the resolver configs.
ConfigBuilder
Build a config.
Error
Error for the workspace or path resolvers.
FieldKey
A field key is a valid key to a field.
PathItemArgs
Input path item arguments
ResolvedPathItem
The path item that has been validated and resolved in the config.

Enums§

MetadataValue
A value for metadata.
Owner
The owner of the path.
PathType
The type of the path.
PathValue
A value for a path.
Permission
The permission for a path.
Resolver
The resolver for the placeholders.
TemplateValue
A value for a template.

Traits§

CreateWorkspaceIoFunction
A helper trait for running the create workspace logic.

Functions§

create_workspace
Build a workspace by creating the files and folders for the given fields.
find_paths
Find paths from a given key and fields.
get_fields
Try to extract the fields from a key and path.
get_key
Find a key from a path and fields.
get_path
Resolve a path from a key and fields.
get_workspace
Get all of the path items that would be created with the create_workspace function.