MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / ensure_workspace_dir

Function ensure_workspace_dir

atomic-repository/src/repository/switch.rs:24–28  ·  view source on GitHub ↗

Ensure the workspace directory for a view exists. Creates `.atomic/workspaces/ /` and any intermediate directories. This is called from `init`, `create_view`, and `create_view_from`.

(dot_dir: &Path, view_name: &str)

Source from the content-addressed store, hash-verified

22/// directories. This is called from `init`, `create_view`, and
23/// `create_view_from`.
24pub(super) fn ensure_workspace_dir(dot_dir: &Path, view_name: &str) -> Result<(), RepositoryError> {
25 let ws = workspace_path(dot_dir, view_name);
26 std::fs::create_dir_all(&ws)?;
27 Ok(())
28}
29
30pub(super) fn working_copy_workspace_path(
31 dot_dir: &Path,

Callers 6

create_overlay_viewMethod · 0.85
create_shared_viewMethod · 0.85
split_viewMethod · 0.85
init_with_viewMethod · 0.85
ensure_snapshot_viewMethod · 0.85

Calls 1

workspace_pathFunction · 0.85

Tested by

no test coverage detected