@@ -17,10 +17,11 @@ #import "OFObject.h" #import "OFSerialization.h" OF_ASSUME_NONNULL_BEGIN +@class OFArray OF_GENERIC(ObjectType); @class OFNumber; @class OFString; /*! * @class OFURL OFURL.h ObjFW/OFURL.h @@ -176,10 +177,19 @@ * * @return The URL as a string */ - (OFString *)string; +/*! + * @brief Returns the path of the URL split into components. + * + * The first component is always empty to designate the root. + * + * @return The path of the URL split into components + */ +- (nullable OFArray OF_GENERIC(OFString *) *)pathComponents; + /*! * @brief Returns the local file system representation for a file URL. * * This only exists for URLs with the file scheme and throws an exception * otherwise.