Writes the given data and properties to a given URL.
- iOS 2.0–7.0Deprecated
- macOS 10.0–10.9Deprecated
- UIKit for Mac 13.0–13.0Deprecated
- tvOS 9.0–9.0Deprecated
- watchOS 2.0–2.0Deprecated
- Core Foundation
The resource to write.
The data to write. Pass
NULLto write only properties.
0if successful, otherwise contains an error code indicating the nature of the problem. See
CFURLErrorfor a list of possible error codes.
true if successful,
Properties not present in
properties are left unchanged, hence if
NULL or empty, the URL's properties are not changed at all.
url uses a file scheme and it references a file, the contents of
data are written to the referenced file, overwriting any preexisting data, and the file’s properties are modified according to
properties. If the file does not exist, but all intermediate directories along the path do already exist, the file is created (otherwise it is not).
url uses a file scheme and it references a directory (the last path character is "
/"), the contents of
data are ignored, but if the parameter value is not
NULL—and all intermediate directories along the path do already exist—a new directory is created (otherwise it is not).
url uses an http scheme, an http
PUT request is sent to the resource with
properties as the header fields and
data as the data.