Contents

init(_:followTargetSymlink:retryOnInterrupt:)

Creates a Stat struct from a FilePath.

Declaration

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

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.