@@ -30,10 +30,15 @@ @interface OFINIFile: OFObject { OFMutableArray OF_GENERIC(OFINICategory *) *_categories; } +/** + * @brief All categories in the INI file. + */ +@property (readonly, nonatomic) OFArray OF_GENERIC(OFINICategory *) *categories; + /** * @brief Creates a new OFINIFile with the contents of the specified file. * * @param path The path to the file whose contents the OFINIFile should contain * @@ -49,11 +54,11 @@ * @param encoding The encoding of the specified file * * @return A new, autoreleased OFINIFile with the contents of the specified file */ + (instancetype)fileWithPath: (OFString *)path - encoding: (of_string_encoding_t)encoding; + encoding: (OFStringEncoding)encoding; - (instancetype)init OF_UNAVAILABLE; /** * @brief Initializes an already allocated OFINIFile with the contents of the @@ -73,11 +78,11 @@ * @param encoding The encoding of the specified file * * @return An initialized OFINIFile with the contents of the specified file */ - (instancetype)initWithPath: (OFString *)path - encoding: (of_string_encoding_t)encoding + encoding: (OFStringEncoding)encoding OF_DESIGNATED_INITIALIZER; /** * @brief Returns an @ref OFINICategory for the category with the specified * name. @@ -101,10 +106,9 @@ * encoding. * * @param path The path of the file to write to * @param encoding The encoding to use */ -- (void)writeToFile: (OFString *)path - encoding: (of_string_encoding_t)encoding; +- (void)writeToFile: (OFString *)path encoding: (OFStringEncoding)encoding; @end OF_ASSUME_NONNULL_END