Contents

subscript(_:as:default:)

Get a value in this dictionary as a file descriptor.

Declaration

subscript(key: String, as type: FileDescriptor.Type = FileDescriptor.self, default defaultValue: @autoclosure () -> FileDescriptor) -> FileDescriptor { get }

Parameters

  • key:

    The key under which to get the file descriptor.

  • type:

    The expected type of the resulting value.

  • defaultValue:

    The value to produce if no file descriptor is available under key.

Return Value

A file descriptor value, possibly defaultValue.

Overview

The returned file descriptor is owned by the caller so they must close it.