Zorb.Config (Zorb v0.10.0)

Copy Markdown View Source

Handles configuration for Zorb, specifically directory paths for temporary artifacts and caching.

Summary

Functions

Returns the directory for cached WASM capsules.

Clears all cached WASM capsules and temporary artifacts.

Ensures the working and cache directories exist.

Returns the path for a specific sidecar payload.

Prunes the cache based on size, file count, or age.

Returns the base working directory for Zorb artifacts. In a library context, this defaults to a 'zorb' directory in the system temp folder.

Functions

cache_dir()

Returns the directory for cached WASM capsules.

clear_cache()

Clears all cached WASM capsules and temporary artifacts.

ensure_dirs!()

Ensures the working and cache directories exist.

payload_path(version)

Returns the path for a specific sidecar payload.

prune_cache(opts \\ [])

Prunes the cache based on size, file count, or age.

working_dir()

Returns the base working directory for Zorb artifacts. In a library context, this defaults to a 'zorb' directory in the system temp folder.