<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSPasteboard/PasteboardType/representedPathExtension",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:@F@NSGetFileType"
  },
  "title" : "representedPathExtension"
}
-->

# representedPathExtension

A file type based on the passed pasteboard type.

```
var representedPathExtension: String? { get }
```

## Discussion

This function is the inverse of both [`fileContentsType(forPathExtension:)`](/documentation/AppKit/NSPasteboard/PasteboardType/fileContentsType(forPathExtension:)) and [`fileNameType(forPathExtension:)`](/documentation/AppKit/NSPasteboard/PasteboardType/fileNameType(forPathExtension:)). When passed a pasteboard type as returned by those functions, it returns the extension or filename from which the type was derived. It returns `nil` if `pboardType` isn’t a pasteboard type created by those functions.

---

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)