CFFTPCreateParsedResourceListing(_:_:_:_:)
Parses an FTP listing to a dictionary.
Declaration
func CFFTPCreateParsedResourceListing(_ alloc: CFAllocator?, _ buffer: UnsafePointer<UInt8>, _ bufferLength: CFIndex, _ parsed: UnsafeMutablePointer<Unmanaged<CFDictionary>?>?) -> CFIndexParameters
- alloc:
The allocator to use to allocate memory for the dictionary. Pass
NULLor 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
NULLpointer 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.