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

Method identity_dir

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

Get the directory for an identity.

(&self, identity: &Identity)

Source from the content-addressed store, hash-verified

872
873 /// Get the directory for an identity.
874 fn identity_dir(&self, identity: &Identity) -> PathBuf {
875 // Use a sanitized name + short ID for the directory name
876 let safe_name = identity
877 .name
878 .chars()
879 .map(|c| {
880 if c.is_alphanumeric() || c == '-' || c == '_' {
881 c
882 } else {
883 '-'
884 }
885 })
886 .collect::<String>();
887
888 self.root
889 .join(format!("{}-{}", safe_name, identity.id.short()))
890 }
891
892 /// Find the directory for an identity by ID.
893 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