<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "tvOS: 15.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 8.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "System",
  "identifier" : "/documentation/System/FilePath/isAbsolute",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "System"
    ],
    "preciseIdentifier" : "s:6System8FilePathV10isAbsoluteSbvp"
  },
  "title" : "isAbsolute"
}
-->

# isAbsolute

Returns true if this path uniquely identifies the location of
a file without reference to an additional starting location.

```
var isAbsolute: Bool { get }
```

## Discussion

On Unix platforms, absolute paths begin with a `/`. `isAbsolute` is
equivalent to `root != nil`.

On Windows, absolute paths are fully qualified paths. `isAbsolute` is
*not* equivalent to `root != nil` for traditional DOS paths
(e.g. `C:foo` and `\bar` have roots but are not absolute). UNC paths
and device paths are always absolute. Traditional DOS paths are
absolute only if they begin with a volume or drive followed by
a `:` and a separator.

NOTE: This does not perform shell expansion or substitute
environment variables; paths beginning with `~` are considered relative.

Examples:

- Unix:
  - `/usr/local/bin`
  - `/tmp/foo.txt`
  - `/`
- Windows:
  - `C:\Users\`
  - `\\?\UNC\server\share\bar.exe`
  - `\\server\share\bar.exe`

---

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)