ObjFW
OFINIFile.h
1 /*
2  * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015
3  * Jonathan Schleifer <js@webkeks.org>
4  *
5  * All rights reserved.
6  *
7  * This file is part of ObjFW. It may be distributed under the terms of the
8  * Q Public License 1.0, which can be found in the file LICENSE.QPL included in
9  * the packaging of this file.
10  *
11  * Alternatively, it may be distributed under the terms of the GNU General
12  * Public License, either version 2 or 3, which can be found in the file
13  * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
14  * file.
15  */
16 
17 #import "OFObject.h"
18 #import "OFString.h"
19 #import "OFINICategory.h"
20 
21 OF_ASSUME_NONNULL_BEGIN
22 
23 @class OFMutableArray OF_GENERIC(ObjectType);
24 
30 @interface OFINIFile: OFObject
31 {
32  OFMutableArray OF_GENERIC(OFINICategory*) *_categories;
33 }
34 
42 + (instancetype)fileWithPath: (OFString*)path;
43 
53 + (instancetype)fileWithPath: (OFString*)path
54  encoding: (of_string_encoding_t)encoding;
55 
64 - initWithPath: (OFString*)path;
65 
75 - initWithPath: (OFString*)path
76  encoding: (of_string_encoding_t)encoding;
77 
87 - (OFINICategory*)categoryForName: (OFString*)name;
88 
94 - (void)writeToFile: (OFString*)path;
95 
103 - (void)writeToFile: (OFString*)path
104  encoding: (of_string_encoding_t)encoding;
105 @end
106 
107 OF_ASSUME_NONNULL_END
of_string_encoding_t
The encoding of a string.
Definition: OFString.h:50
The root class for all other classes inside ObjFW.
Definition: OFObject.h:364
An abstract class for storing, adding and removing objects in an array.
Definition: OFMutableArray.h:46
A class for handling strings.
Definition: OFString.h:91
A class for representing a category of an INI file.
Definition: OFINICategory.h:32
A class for reading, creating and modifying INI files.
Definition: OFINIFile.h:30