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

Function ensure_workspace_dir

atomic-repository/src/repository/switch.rs:17–21  ·  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

15/// directories. This is called from `init`, `create_view`, and
16/// `create_view_from`.
17pub(super) fn ensure_workspace_dir(dot_dir: &Path, view_name: &str) -> Result<(), RepositoryError> {
18 let ws = workspace_path(dot_dir, view_name);
19 std::fs::create_dir_all(&ws)?;
20 Ok(())
21}
22
23/// Remove empty ancestor directories after file removal.
24///

Callers 5

create_viewMethod · 0.85
create_shared_viewMethod · 0.85
create_view_fromMethod · 0.85
initMethod · 0.85
switch_viewMethod · 0.85

Calls 1

workspace_pathFunction · 0.85

Tested by

no test coverage detected