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

Method new

atomic-core/src/output/memory.rs:271–277  ·  view source on GitHub ↗

Create a new, empty in-memory working copy. # Example ```rust use atomic_core::output::Memory; let wc = Memory::new(); ```

()

Source from the content-addressed store, hash-verified

269 /// let wc = Memory::new();
270 /// ```
271 pub fn new() -> Self {
272 Self {
273 files: RefCell::new(HashMap::new()),
274 next_inode: AtomicU64::new(1), // Start from 1, 0 is ROOT
275 non_writable: RefCell::new(Vec::new()),
276 }
277 }
278
279 /// Allocate a new unique inode.
280 ///

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected