ObjFW  Diff

Differences From Artifact [5e8cf7bcda]:

To Artifact [e16ab950d2]:


18
19
20
21
22
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
@class OFString;

/**
 * \brief A class which provides functions to read, write and manipulate files.
 */
@interface OFFile: OFStream
{
	FILE *fp;
	BOOL close;

}

/**
 * \param path The path to the file to open as a string
 * \param mode The mode in which the file should be opened as a string
 * \return A new autoreleased OFFile
 */
+ fileWithPath: (OFString*)path
	  mode: (OFString*)mode;

/**
 * \param fp A file pointer, returned from for example fopen().
 *	     It is not closed when the OFFile object is deallocated!
 * \return A new autoreleased OFFile
 */
+ fileWithFilePointer: (FILE*)fp;

/**
 * Changes the mode of a file.
 *
 * Only changes read-only flag on Windows.
 *
 * \param path The path to the file of which the mode should be changed as a







|
|
>











|



|







18
19
20
21
22
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
@class OFString;

/**
 * \brief A class which provides functions to read, write and manipulate files.
 */
@interface OFFile: OFStream
{
	int fd;
	BOOL closable;
	BOOL eos;
}

/**
 * \param path The path to the file to open as a string
 * \param mode The mode in which the file should be opened as a string
 * \return A new autoreleased OFFile
 */
+ fileWithPath: (OFString*)path
	  mode: (OFString*)mode;

/**
 * \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
 */
+ fileWithFileDescriptor: (int)fd;

/**
 * Changes the mode of a file.
 *
 * Only changes read-only flag on Windows.
 *
 * \param path The path to the file of which the mode should be changed as a
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
 */
- initWithPath: (OFString*)path
	  mode: (OFString*)mode;

/**
 * Initializes an already allocated OFFile.
 *
 * \param fp A file pointer, returned from for example fopen().
 *	     It is not closed when the OFFile object is deallocated!
 */
- initWithFilePointer: (FILE*)fp;
@end

/// An OFFile object for stdin
extern OFFile *of_stdin;
/// An OFFile object for stdout
extern OFFile *of_stdout;
/// An OFFile object for stderr
extern OFFile *of_stderr;







|


|








119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
 */
- initWithPath: (OFString*)path
	  mode: (OFString*)mode;

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

/// An OFFile object for stdin
extern OFFile *of_stdin;
/// An OFFile object for stdout
extern OFFile *of_stdout;
/// An OFFile object for stderr
extern OFFile *of_stderr;