Creates an FTP write stream.
- iOS 2.0–9.0Deprecated
- macOS 10.3–10.11Deprecated
- Mac Catalyst 13.0–13.0Deprecated
- tvOS 9.0–9.0Deprecated
The allocator to use to allocate memory for the new object. Pass
NULLor kCFAllocatorDefault to use the current default allocator.
A pointer to a CFURL structure for the URL to be uploaded created by calling any of the
CFURLCreatefunctions, such as
A new write stream, or
NULL if the call failed. Ownership follows the The Create Rule.
This function creates an FTP write stream for uploading data to an FTP URL. If the
ftp parameter is created with the user name and password as part of the URL (such as
ftp://username:) then the user name and password will automatically be set in the
CFWrite to set the steam’s properties, such as
k to associate a user name and password with the stream that are used to log in when the stream is opened. See Constants for a description of all FTP stream properties.
After creating the write stream, you can call
CFWrite at any time to check the status of the stream.
To initiate a connection with the FTP server, call
CFWrite. If the URL specifies a directory, the open is immediately followed by the event
k (and the stream passes to the state
k). Once the stream reaches this state, the directory has been created. Intermediary directories are not created.
To write to the FTP stream, call
To close a connection with the FTP server, call