ObjFW  Diff

Differences From Artifact [76b233d4a0]:

To Artifact [5c8981b0ad]:


37
38
39
40
41
42
43
44
45
46



47
48
49
50
51
52
53
37
38
39
40
41
42
43



44
45
46
47
48
49
50
51
52
53







-
-
-
+
+
+







#endif

/*!
 * @brief A class which provides functions to read, write and manipulate files.
 */
@interface OFFile: OFSeekableStream
{
	int  fd;
	BOOL closable;
	BOOL atEndOfStream;
	int  _fd;
	BOOL _closable;
	BOOL _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.@n
70
71
72
73
74
75
76
77
78


79
80
81

82
83
84
85
86
87
88
70
71
72
73
74
75
76


77
78
79
80

81
82
83
84
85
86
87
88







-
-
+
+


-
+







 */
+ (instancetype)fileWithPath: (OFString*)path
			mode: (OFString*)mode;

/*!
 * @brief Creates a new OFFile with the specified file descriptor.
 *
 * @param fileDescriptor A file descriptor, returned from for example open().
 *			 It is not closed when the OFFile object is deallocated!
 * @param fd A file descriptor, returned from for example open().
 *	     It is not closed when the OFFile object is deallocated!
 * @return A new autoreleased OFFile
 */
+ (instancetype)fileWithFileDescriptor: (int)fileDescriptor;
+ (instancetype)fileWithFileDescriptor: (int)fd;

/*!
 * @brief Returns the path fo the current working directory.
 *
 * @return The path of the current working directory
 */
+ (OFString*)currentDirectoryPath;
260
261
262
263
264
265
266
267
268


269
270

271
272
273
274
275
276
277
260
261
262
263
264
265
266


267
268
269

270
271
272
273
274
275
276
277







-
-
+
+

-
+







 */
- initWithPath: (OFString*)path
	  mode: (OFString*)mode;

/*!
 * @brief Initializes an already allocated OFFile.
 *
 * @param fileDescriptor A file descriptor, returned from for example open().
 *			 It is not closed when the OFFile object is deallocated!
 * @param fd A file descriptor, returned from for example open().
 *	     It is not closed when the OFFile object is deallocated!
 */
- initWithFileDescriptor: (int)fileDescriptor;
- initWithFileDescriptor: (int)fd;
@end

#ifdef __cplusplus
extern "C" {
#endif
/*! @file */