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

Method directory_at

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

Create a directory item backed by its actual graph inode position.

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

Source from the content-addressed store, hash-verified

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 {
547 let path = path.into();
548 let depth = TreeCollectOptions::path_depth(&path);
549 Self {
550 path,
551 inode,
552 position,
553 is_directory: true,
554 metadata: FileMetadata::directory(),
555 depth,
556 }
557 }
558
559 /// Check if this is a file.
560 ///

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected