destinationOfSymbolicLink(at:)

    Returns the path of the item pointed to by a symbolic link.

    FileSystem.swift:585
    iOS
    13.0+
    macOS
    10.15+
    tvOS
    13.0+
    watchOS
    6.0+
    func destinationOfSymbolicLink(at path: FilePath) async throws -> FilePath

    Parameters

    path

    The path of a file or directory.

    Returns

    The path of the file or directory to which the symbolic link points to.

    The destination of the symbolic link is not guaranteed to be a valid path, nor is it guaranteed to be an absolute path. If you need to open a file which is the destination of a symbolic link then the appropriate open function:

    Errors

    Error codes thrown include:

    Implementation details

    Uses the readlink(2) system call.

    Other members in extension

    Type members

    Instance members

    Show system interfaces (1)

    Hide system interfaces