Function

CFFTPCreateParsedResourceListing

Parses an FTP listing to a dictionary.

Declaration

CFIndex CFFTPCreateParsedResourceListing(CFAllocatorRef alloc, const UInt8 *buffer, CFIndex bufferLength, CFDictionaryRef  _Nullable *parsed);

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

kCFFTPResourceGroup

CFDictionary key for getting the CFString containing the name of a group that shares the FTP resource.

Deprecated
kCFFTPResourceLink

CFDictionary key for getting the CFString containing the symbolic link information. If the item is a symbolic link, the CFString contains the path to the item that the link references.

Deprecated
kCFFTPResourceModDate

CFDictionary key for getting the CFDate containing the last date and time the FTP resource was modified.

Deprecated
kCFFTPResourceMode

CFDictionary key for getting the CFNumber containing the access permissions, defined in sys/types.h, of the FTP resource.

Deprecated
kCFFTPResourceName

CFDictionary key for getting the CFString containing the name of the FTP resource.

Deprecated
kCFFTPResourceOwner

CFDictionary key for getting the CFString containing the name of the owner of the FTP resource.

Deprecated
kCFFTPResourceSize

CFDictionary key for getting the CFNumber containing the size in bytes of the FTP resource.

Deprecated
kCFFTPResourceType

CFDictionary key for getting the CFNumber containing the type of the FTP resource as defined in sys/dirent.h.

Deprecated