URLForPath:error:
Returns a URL for the specified relative path.
Declaration
- (NSURL *) URLForPath:(NSString *) path error:(NSError **) error;Parameters
- path:
The relative file path.
- error:
A pointer to an error that will be set if an error occurs.
Discussion
All asset packs share the same namespace, so you can treat the overall collection of downloaded asset packs as if it were a single root directory that contains all of your subdirectories and asset files, regardless of the specific asset pack in which any particular file resides. Unlike contentsAtPath:searchingInAssetPackWithIdentifier:options:error: and fileDescriptorForPath:searchingInAssetPackWithIdentifier:error:, this method supports retrieving entire directories—including packages—in which case it merges the corresponding slices of the shared logical directory from all downloaded asset packs that contain such slices. If there’s a file-path collision across multiple asset packs, then it’s undefined from which asset pack an individual file will be resolved.