---
title: "init(_:followTargetSymlink:retryOnInterrupt:)"
framework: system
role: symbol
role_heading: Initializer
path: "system/stat/init(_:followtargetsymlink:retryoninterrupt:)-4apli"
---

# init(_:followTargetSymlink:retryOnInterrupt:)

Creates a Stat struct from a FilePath.

## Declaration

```swift
init(_ path: FilePath, followTargetSymlink: Bool = true, retryOnInterrupt: Bool = true) throws(Errno)
```

## Discussion

Discussion followTargetSymlink determines the behavior if path ends with a symbolic link. By default, followTargetSymlink is true and this initializer behaves like stat(). If followTargetSymlink is set to false, this initializer behaves like lstat() and returns information about the symlink itself. The corresponding C function is stat() or lstat() as described above.
