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

Method read_current_view_if_present

atomic-repository/src/repository/mod.rs:1379–1391  ·  view source on GitHub ↗
(dot_dir: &Path)

Source from the content-addressed store, hash-verified

1377 }
1378
1379 fn read_current_view_if_present(dot_dir: &Path) -> Result<Option<String>, RepositoryError> {
1380 for name in ["current_view", "current_stack"] {
1381 let path = dot_dir.join(name);
1382 if path.exists() {
1383 let content = std::fs::read_to_string(path)?;
1384 let value = content.trim();
1385 if !value.is_empty() {
1386 return Ok(Some(value.to_string()));
1387 }
1388 }
1389 }
1390 Ok(None)
1391 }
1392
1393 fn read_legacy_current_view(
1394 working_copy_dot_dir: &Path,

Callers

nothing calls this directly

Calls 2

existsMethod · 0.45
is_emptyMethod · 0.45

Tested by

no test coverage detected