Contents

stat(relativeTo:flags:retryOnInterrupt:)

Creates a Stat struct for the file referenced by this FilePath using the given Flags, including a FileDescriptor to resolve a relative path.

Declaration

func stat(relativeTo fd: FileDescriptor, flags: Stat.Flags, retryOnInterrupt: Bool = true) throws(Errno) -> Stat

Discussion

If path is absolute (starts with a forward slash), then fd is ignored. If path is relative, it is resolved against the directory given by fd.

The corresponding C function is fstatat().