<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -",
    "watchOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "System",
  "identifier" : "/documentation/System/Stat/init(_:flags:retryOnInterrupt:)-349q0",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "System"
    ],
    "preciseIdentifier" : "s:6System4StatV_5flags16retryOnInterruptAcA8FilePathV_AC5FlagsVSbtAA5ErrnoVYKcfc"
  },
  "title" : "init(_:flags:retryOnInterrupt:)"
}
-->

# init(_:flags:retryOnInterrupt:)

Creates a `Stat` struct from a `FilePath` and `Flags`.

```
init(_ path: FilePath, flags: Stat.Flags, retryOnInterrupt: Bool = true) throws(Errno)
```

## Discussion

If `path` is relative, it is resolved against the current working directory.

The corresponding C function is `fstatat()`.

---

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)