Contents

readSymbolicLink(_:replyHandler:)

Reads a symbolic link.

Declaration

func readSymbolicLink(_ item: FSItem, replyHandler reply: @escaping  @Sendable (FSFileName?, (any Error)?) -> Void)
func readSymbolicLink(_ item: FSItem) async throws -> FSFileName

Parameters

  • item:

    The symbolic link to read from. FSKit guarantees this item is of type Symlink.

  • reply:

    A block or closure to indicate success or failure. If reading succeeds, pass the link’s contents as an Fsfilename and a nil error. If reading fails, pass the relevant error as the second parameter; FSKit ignores any Fsfilename in this case. For an async Swift implementation, there’s no reply handler; simply return the Fsfilename or throw an error.

See Also

Working with links