---
title: deletingPathExtension
framework: foundation
role: symbol
role_heading: Instance Property
path: foundation/nsurl/deletingpathextension
---

# deletingPathExtension

A URL you create by removing the path extension from the receiver, if any. (read-only)

## Declaration

```swift
var deletingPathExtension: URL? { get }
```

## Discussion

Discussion If the receiver represents the root path, this property contains a copy of the original URL. If the URL has multiple path extensions, only the last one is removed.

## See Also

### Modifying and Converting a File URL

- [filePathURL](foundation/nsurl/filepathurl.md)
- [fileReferenceURL()](foundation/nsurl/filereferenceurl().md)
- [appendingPathComponent(_:)](foundation/nsurl/appendingpathcomponent(_:).md)
- [appendingPathComponent(_:isDirectory:)](foundation/nsurl/appendingpathcomponent(_:isdirectory:).md)
- [appendingPathComponent(_:conformingTo:)](foundation/nsurl/appendingpathcomponent(_:conformingto:).md)
- [appendingPathExtension(_:)](foundation/nsurl/appendingpathextension(_:).md)
- [appendingPathExtension(for:)](foundation/nsurl/appendingpathextension(for:).md)
- [deletingLastPathComponent](foundation/nsurl/deletinglastpathcomponent.md)
- [resolvingSymlinksInPath](foundation/nsurl/resolvingsymlinksinpath.md)
- [standardizingPath](foundation/nsurl/standardizingpath.md)
- [hasDirectoryPath](foundation/nsurl/hasdirectorypath.md)
