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

Method identity_dir

atomic-identity/src/store.rs:723–739  ·  view source on GitHub ↗

Get the directory for an identity.

(&self, identity: &Identity)

Source from the content-addressed store, hash-verified

721
722 /// Get the directory for an identity.
723 fn identity_dir(&self, identity: &Identity) -> PathBuf {
724 // Use a sanitized name + short ID for the directory name
725 let safe_name = identity
726 .name
727 .chars()
728 .map(|c| {
729 if c.is_alphanumeric() || c == '-' || c == '_' {
730 c
731 } else {
732 '-'
733 }
734 })
735 .collect::<String>();
736
737 self.root
738 .join(format!("{}-{}", safe_name, identity.id.short()))
739 }
740
741 /// Find the directory for an identity by ID.
742 fn find_identity_dir(&self, id: &IdentityId) -> Result<PathBuf, IdentityError> {

Callers 1

save_with_secretMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected