Creates and returns a data object containing the data from the location specified by a given URL.
- iOS 2.0+
- macOS 10.4+
- tvOS 9.0+
- watchOS 2.0+
The URL from which to read data.
A mask that specifies options for reading the data. Constant components are described in
If there is an error reading in the data, upon return contains an error object that describes the problem.
A data object that holds data located at
nil if the data object could not be created.
Use this method to converting
data:// URLs to NSData objects. You can also use it to read short files synchronously. If you need to read potentially large files, use
input to open a stream, then read the file incrementally.
If you need to know the reason for failure, use