Contents

CFFileDescriptorCreate(_:_:_:_:_:)

Creates a new CFFileDescriptor.

Declaration

func CFFileDescriptorCreate(_ allocator: CFAllocator!, _ fd: CFFileDescriptorNativeDescriptor, _ closeOnInvalidate: Bool, _ callout: CFFileDescriptorCallBack!, _ context: UnsafePointer<CFFileDescriptorContext>!) -> CFFileDescriptor!

Parameters

  • allocator:

    The allocator to use to allocate memory for the new file descriptor object. Pass NULL or kCFAllocatorDefault to use the current default allocator.

  • fd:

    The file descriptor for the new CFFileDescriptor.

  • closeOnInvalidate:

    true if the new CFFileDescriptor should close fd when it is invalidated, otherwise false.

  • callout:

    The CFFileDescriptorCallBack for the new CFFileDescriptor.

  • context:

    Contextual information for the new CFFileDescriptor.

Return Value

A new CFFileDescriptor or NULL if there was a problem creating the object. Ownership follows the The Create Rule.

See Also

Related Documentation