A new string made by expanding the initial component of the receiver to its full path value.
- iOS 2.0+
- macOS 10.0+
- Mac Catalyst 13.0+Beta
- tvOS 9.0+
- watchOS 2.0+
A new string made by expanding the initial component of the receiver, if it begins with “
~” or “
~user”, to its full path value. Returns a new string matching the receiver if the receiver’s initial component can’t be expanded.
Note that this method only works with file paths (not, for example, string representations of URLs).