23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
-
-
-
+
|
#else
typedef struct _OFFileHandle *OFFileHandle;
static const OFFileHandle OFInvalidFileHandle = NULL;
#endif
OF_ASSUME_NONNULL_BEGIN
@class OFURI;
/**
* @class OFFile OFFile.h ObjFW/OFFile.h
*
* @brief A class which provides methods to read and write files.
*/
OF_SUBCLASSING_RESTRICTED
@interface OFFile: OFSeekableStream
#ifdef OF_FILE_HANDLE_IS_FD
<OFReadyForReadingObserving, OFReadyForWritingObserving>
#endif
{
OFFileHandle _handle;
bool _atEndOfStream;
bool _initialized, _atEndOfStream;
}
/**
* @brief Creates a new OFFile with the specified path and mode.
*
* @param path The path to the file to open as a string
* @param mode The mode in which the file should be opened.
|