<!--
{
  "availability" : [
    "macOS: 12.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Virtualization",
  "identifier" : "/documentation/Virtualization/VZMultipleDirectoryShare/canonicalizedName(from:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Virtualization"
    ],
    "preciseIdentifier" : "c:objc(cs)VZMultipleDirectoryShare(cm)canonicalizedNameFromName:"
  },
  "title" : "canonicalizedName(from:)"
}
-->

# canonicalizedName(from:)

Transforms a string to be a valid directory name.

```
class func canonicalizedName(from name: String) -> String?
```

## Parameters

`name`

The name to transform.

## Return Value

Returns a String with the canonicalized name, or `nil` if there was an error.

## Discussion

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)