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

Method directory

atomic-core/src/output/repo/tree.rs:541–543  ·  view source on GitHub ↗

Create a new directory item. # Arguments `path` - Path relative to repository root `inode` - Directory's stable identifier # Example ```rust use atomic_core::output::repo::TreeItem; use atomic_core::types::Inode; let item = TreeItem::directory("src/lib", Inode::ROOT); assert_eq!(item.path, "src/lib"); assert!(item.is_directory); ```

(path: impl Into<String>, inode: Inode)

Source from the content-addressed store, hash-verified

539 /// assert!(item.is_directory);
540 /// ```
541 pub fn directory(path: impl Into<String>, inode: Inode) -> Self {
542 Self::directory_at(path, inode, Position::ROOT)
543 }
544
545 /// Create a directory item backed by its actual graph inode position.
546 pub fn directory_at(path: impl Into<String>, inode: Inode, position: Position<NodeId>) -> Self {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected