Contents

CFFTPCreateParsedResourceListing(_:_:_:_:)

Parses an FTP listing to a dictionary.

Declaration

func CFFTPCreateParsedResourceListing(_ alloc: CFAllocator?, _ buffer: UnsafePointer<UInt8>, _ bufferLength: CFIndex, _ parsed: UnsafeMutablePointer<Unmanaged<CFDictionary>?>?) -> CFIndex

Parameters

  • alloc:

    The allocator to use to allocate memory for the dictionary. Pass NULL or kCFAllocatorDefault to use the current default allocator.

  • buffer:

    A pointer to a buffer holding zero or more lines of resource listing.

  • bufferLength:

    The length in bytes of the buffer pointed to by buffer.

  • parsed:

    Upon return, contains a dictionary containing the parsed resource information. If parsing fails, a NULL pointer is returned.

Return Value

The number of bytes parsed, 0 if no bytes were available for parsing, or -1 if parsing failed.

Discussion

This function examines the contents of buffer as an FTP directory listing and parses into a CFDictionary the information for a single file or folder. The CFDictionary is returned in the parsed parameter, and the number of bytes used from buffer is returned.

See Also

FTP