<!--
{
  "availability" : [
    "iOS: 7.0.0 -",
    "iPadOS: 7.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.9.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSURL/fileSystemRepresentation",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSURL(py)fileSystemRepresentation"
  },
  "title" : "fileSystemRepresentation"
}
-->

# fileSystemRepresentation

A C string containing the URL’s file system path. (read-only)

```
var fileSystemRepresentation: UnsafePointer<CChar> { get }
```

## Discussion

This returns a null-terminated C string in file system representation.

This string is automatically freed in the same way that a returned object would be released. The caller must either copy the string or use [`getFileSystemRepresentation(_:maxLength:)`](/documentation/Foundation/NSURL/getFileSystemRepresentation(_:maxLength:)) if it needs to store the representation outside of the autorelease context in which the value was obtained.

The file system representation format is described in File Encodings and Fonts.

---

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)