Synchronously writes the specified data to the receiver.
- iOS 2.0–13.0Deprecated
- macOS 10.0–10.15Deprecated
- Mac Catalyst 13.0–13.4Deprecated
- tvOS 9.0–13.0Deprecated
- watchOS 2.0–6.0Deprecated
The data to be written.
If the receiver is a file, writing takes place at the file pointer’s current position. After it writes the data, the method advances the file pointer by the number of bytes written. This method raises an exception if the file descriptor is closed or is not valid, if the receiver represents an unconnected pipe or socket endpoint, if no free space is left on the file system, or if any other writing error occurs.