info(forFileAt:infoAboutSymbolicLink:)

    Returns information about the file at path if it exists; nil otherwise.

    FileSystem.swift:285
    iOS
    13.0+
    macOS
    10.15+
    tvOS
    13.0+
    watchOS
    6.0+
    func info(forFileAt path: FilePath, infoAboutSymbolicLink: Bool) async throws -> FileInfo?

    Parameters

    path

    The path of the file.

    If the file is a symbolic link and this parameter is true then information about the link will be returned, otherwise information about the destination of the symbolic link is returned.

    Returns

    Information about the file at the given path or nil if no file exists.

    Implementation details

    Uses lstat(2) if infoAboutSymbolicLink is true, stat(2) otherwise.

    Other members in extension

    Type members

    Instance members

    Show system interfaces (1)

    Hide system interfaces