---
title: "canonicalizedName(from:)"
framework: virtualization
role: symbol
role_heading: Type Method
path: "virtualization/vzmultipledirectoryshare/canonicalizedname(from:)"
---

# canonicalizedName(from:)

Transforms a string to be a valid directory name.

## Declaration

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

## Parameters

- `name`: The name to transform.

## Return Value

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

## See Also

### Directory name utility methods

- [validateName(_:)](virtualization/vzmultipledirectoryshare/validatename(_:).md)
