Skip to main content

Module resources_manage

Module resources_manage 

Source
Expand description

Management commands for resource files: list / add / remove / show / where.

These functions back the zig resources … subcommands. They operate on the same tiered layout that crate::resources::ResourceCollector consumes at run time:

  • ~/.zig/resources/_shared/ — the global shared tier
  • ~/.zig/resources/<workflow>/ — the global per-workflow tier
  • <git-root>/.zig/resources/ — the project (cwd) tier

Inline resources declared in .zug files are not manipulated by these commands — they live inside the workflow file itself and the user edits them by hand.

Structs§

ListedResource
A single resource entry returned by list_resources.

Enums§

ResourceScope
Which tier(s) a list or where command should consider.
ResourceTarget
Where an add or remove command should place / look for a resource.

Functions§

add_resource
Copy a file into the chosen tier directory, optionally renaming it.
add_to_dir
Lower-level helper: copy src into dir, optionally renaming it.
list_resources
List resources discovered under the requested scope.
print_search_paths
Print the directories the collector would search for the current invocation, in tier order.
remove_from_dir
Lower-level helper: remove a single resource from an explicit directory.
remove_resource
Delete a resource by name from the chosen tier.
show_resource
Print the absolute path and contents of a resource discovered in any tier.