@@ -30,25 +30,25 @@ * * @brief A class for parsing URIs as per RFC 3986 and accessing parts of it. */ @interface OFURI: OFObject { - OFString *_Nullable _scheme; + OFString *_scheme; OFString *_Nullable _percentEncodedHost; OFNumber *_Nullable _port; OFString *_Nullable _percentEncodedUser; OFString *_Nullable _percentEncodedPassword; - OFString *_Nullable _percentEncodedPath; + OFString *_percentEncodedPath; OFString *_Nullable _percentEncodedQuery; OFString *_Nullable _percentEncodedFragment; OF_RESERVE_IVARS(OFURI, 4) } /** * @brief The scheme part of the URI. */ -@property OF_NULLABLE_PROPERTY (readonly, copy, nonatomic) OFString *scheme; +@property (readonly, copy, nonatomic) OFString *scheme; /** * @brief The host part of the URI. */ @property OF_NULLABLE_PROPERTY (readonly, copy, nonatomic) OFString *host; @@ -87,33 +87,31 @@ OFString *percentEncodedPassword; /** * @brief The path part of the URI. */ -@property OF_NULLABLE_PROPERTY (readonly, copy, nonatomic) OFString *path; +@property (readonly, copy, nonatomic) OFString *path; /** * @brief The path part of the URI in percent-encoded form. */ -@property OF_NULLABLE_PROPERTY (readonly, copy, nonatomic) - OFString *percentEncodedPath; +@property (readonly, copy, nonatomic) OFString *percentEncodedPath; /** * @brief The path of the URI split into components. * * The first component must always be `/` to designate the root. */ -@property OF_NULLABLE_PROPERTY (readonly, copy, nonatomic) +@property (readonly, copy, nonatomic) OFArray OF_GENERIC(OFString *) *pathComponents; /** * @brief The last path component of the URI. * * Returns the empty string if the path is the root. */ -@property OF_NULLABLE_PROPERTY (readonly, copy, nonatomic) - OFString *lastPathComponent; +@property (readonly, copy, nonatomic) OFString *lastPathComponent; /** * @brief The query part of the URI. */ @property OF_NULLABLE_PROPERTY (readonly, copy, nonatomic) OFString *query; @@ -263,10 +261,12 @@ * @return An initialized OFURI */ - (instancetype)initFileURIWithPath: (OFString *)path isDirectory: (bool)isDirectory; #endif + +- (instancetype)init OF_UNAVAILABLE; /** * @brief Returns a new URI with the specified path component appended. * * If the URI is a file URI, the file system is queried whether the appended