---
title: "stat(followTargetSymlink:retryOnInterrupt:)"
framework: system
role: symbol
role_heading: Instance Method
path: "system/filepath/stat(followtargetsymlink:retryoninterrupt:)"
---

# stat(followTargetSymlink:retryOnInterrupt:)

Creates a Stat struct for the file referenced by this FilePath.

## Declaration

```swift
func stat(followTargetSymlink: Bool = true, retryOnInterrupt: Bool = true) throws(Errno) -> Stat
```

## 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.
