Contents

readSymbolicLink(_:context:replyHandler:)

Reads a symbolic link.

Declaration

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

Parameters

  • item:

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

  • context:

    An object that enables context-aware file system decisions throughout the operation.

  • reply:

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

See Also

Working with links