ObjFW  Diff

Differences From Artifact [40faae77ac]:

To Artifact [c47b91b130]:


132
133
134
135
136
137
138


139
140
141
142
143
144
145
 * For example, a query like `key1=value1&key2=value2` would correspond to the
 * following dictionary:
 *
 *     @{
 *         @"key1": @"value1",
 *         @"key2": @"value2"
 *     }


 */
@property OF_NULLABLE_PROPERTY (readonly, copy, nonatomic)
    OFDictionary OF_GENERIC(OFString *, OFString *) *queryDictionary;

/**
 * @brief The fragment part of the URL.
 */







>
>







132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
 * For example, a query like `key1=value1&key2=value2` would correspond to the
 * following dictionary:
 *
 *     @{
 *         @"key1": @"value1",
 *         @"key2": @"value2"
 *     }
 *
 * @throw OFInvalidFormatException The query is not in the correct format
 */
@property OF_NULLABLE_PROPERTY (readonly, copy, nonatomic)
    OFDictionary OF_GENERIC(OFString *, OFString *) *queryDictionary;

/**
 * @brief The fragment part of the URL.
 */
174
175
176
177
178
179
180


181
182
183
184
185
186
187
188
189
190


191
192
193
194
195
196
197
#endif

/**
 * @brief Creates a new URL with the specified string.
 *
 * @param string A string describing a URL
 * @return A new, autoreleased OFURL


 */
+ (instancetype)URLWithString: (OFString *)string;

/**
 * @brief Creates a new URL with the specified string relative to the
 *	  specified URL.
 *
 * @param string A string describing a URL
 * @param URL An URL to which the string is relative
 * @return A new, autoreleased OFURL


 */
+ (instancetype)URLWithString: (OFString *)string relativeToURL: (OFURL *)URL;

#ifdef OF_HAVE_FILES
/**
 * @brief Creates a new URL with the specified local file path.
 *







>
>










>
>







176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
#endif

/**
 * @brief Creates a new URL with the specified string.
 *
 * @param string A string describing a URL
 * @return A new, autoreleased OFURL
 * @throw OFInvalidFormatException The specified string is not a valid URL
 *				   string
 */
+ (instancetype)URLWithString: (OFString *)string;

/**
 * @brief Creates a new URL with the specified string relative to the
 *	  specified URL.
 *
 * @param string A string describing a URL
 * @param URL An URL to which the string is relative
 * @return A new, autoreleased OFURL
 * @throw OFInvalidFormatException The specified string is not a valid URL
 *				   string
 */
+ (instancetype)URLWithString: (OFString *)string relativeToURL: (OFURL *)URL;

#ifdef OF_HAVE_FILES
/**
 * @brief Creates a new URL with the specified local file path.
 *
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222


223
224
225
226
227
228
229
230
231
232


233
234
235
236
237
238
239

/**
 * @brief Creates a new URL with the specified local file path.
 *
 * @param path The local file path
 * @param isDirectory Whether the path is a directory, in which case a slash is
 *		      appened if there is no slash yet
 * @return An Initialized OFURL
 */
+ (instancetype)fileURLWithPath: (OFString *)path
		    isDirectory: (bool)isDirectory;
#endif

/**
 * @brief Initializes an already allocated OFURL with the specified string.
 *
 * @param string A string describing a URL
 * @return An initialized OFURL


 */
- (instancetype)initWithString: (OFString *)string;

/**
 * @brief Initializes an already allocated OFURL with the specified string and
 *	  relative URL.
 *
 * @param string A string describing a URL
 * @param URL A URL to which the string is relative
 * @return An initialized OFURL


 */
- (instancetype)initWithString: (OFString *)string relativeToURL: (OFURL *)URL;

#ifdef OF_HAVE_FILES
/**
 * @brief Initializes an already allocated OFURL with the specified local file
 *	  path.







|










>
>










>
>







211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249

/**
 * @brief Creates a new URL with the specified local file path.
 *
 * @param path The local file path
 * @param isDirectory Whether the path is a directory, in which case a slash is
 *		      appened if there is no slash yet
 * @return An initialized OFURL
 */
+ (instancetype)fileURLWithPath: (OFString *)path
		    isDirectory: (bool)isDirectory;
#endif

/**
 * @brief Initializes an already allocated OFURL with the specified string.
 *
 * @param string A string describing a URL
 * @return An initialized OFURL
 * @throw OFInvalidFormatException The specified string is not a valid URL
 *				   string
 */
- (instancetype)initWithString: (OFString *)string;

/**
 * @brief Initializes an already allocated OFURL with the specified string and
 *	  relative URL.
 *
 * @param string A string describing a URL
 * @param URL A URL to which the string is relative
 * @return An initialized OFURL
 * @throw OFInvalidFormatException The specified string is not a valid URL
 *				   string
 */
- (instancetype)initWithString: (OFString *)string relativeToURL: (OFURL *)URL;

#ifdef OF_HAVE_FILES
/**
 * @brief Initializes an already allocated OFURL with the specified local file
 *	  path.
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
/**
 * @brief Initializes an already allocated OFURL with the specified local file
 *	  path.
 *
 * @param path The local file path
 * @param isDirectory Whether the path is a directory, in which case a slash is
 *		      appened if there is no slash yet
 * @return An Initialized OFURL
 */
- (instancetype)initFileURLWithPath: (OFString *)path
			isDirectory: (bool)isDirectory;
#endif

/**
 * @brief Returns a new URL with the specified path component appended.







|







259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
/**
 * @brief Initializes an already allocated OFURL with the specified local file
 *	  path.
 *
 * @param path The local file path
 * @param isDirectory Whether the path is a directory, in which case a slash is
 *		      appened if there is no slash yet
 * @return An initialized OFURL
 */
- (instancetype)initFileURLWithPath: (OFString *)path
			isDirectory: (bool)isDirectory;
#endif

/**
 * @brief Returns a new URL with the specified path component appended.