---
title: "CFFTPCreateParsedResourceListing(_:_:_:_:)"
framework: cfnetwork
role: symbol
role_heading: Function
path: "cfnetwork/cfftpcreateparsedresourcelisting(_:_:_:_:)"
---

# CFFTPCreateParsedResourceListing(_:_:_:_:)

Parses an FTP listing to a dictionary.

## Declaration

```swift
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

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

## Discussion

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](cfnetwork/kcfftpresourcegroup.md)
- [kCFFTPResourceLink](cfnetwork/kcfftpresourcelink.md)
- [kCFFTPResourceModDate](cfnetwork/kcfftpresourcemoddate.md)
- [kCFFTPResourceMode](cfnetwork/kcfftpresourcemode.md)
- [kCFFTPResourceName](cfnetwork/kcfftpresourcename.md)
- [kCFFTPResourceOwner](cfnetwork/kcfftpresourceowner.md)
- [kCFFTPResourceSize](cfnetwork/kcfftpresourcesize.md)
- [kCFFTPResourceType](cfnetwork/kcfftpresourcetype.md)
